Skip to content

Restore dual architecture support for 3.9 - #487

Merged
kieran-osgood-shopify merged 8 commits into
mainfrom
kieran-osgood/cx-rn-v39-compat/dual-architecture
Aug 26, 2026
Merged

Restore dual architecture support for 3.9#487
kieran-osgood-shopify merged 8 commits into
mainfrom
kieran-osgood/cx-rn-v39-compat/dual-architecture

Conversation

@kieran-osgood-shopify

@kieran-osgood-shopify kieran-osgood-shopify commented May 13, 2026

Copy link
Copy Markdown
Contributor

TLDR;

The plan was to move up to new arch in #456 and release this under v4

This PR somewhat undoes this, and will release new arch with interop support under v3.9

V4 will be new arch only

This PR essentially undoes a number of improvements made in https://github.com/Shopify/checkout-sheet-kit-react-native/pull/456 around moving from async to sync api's (see getConfig / isAcceleratedCheckoutAvailable / isApplePayAvailable)

As those revert, this is no longer a breaking change and can be released under 3.9.0

I've validated there are no breaking changes to the JS contract by adding the "@microsoft/api-extractor": "^7.58.7", package and dumping the api contract from v3.8.4

What changes are you making?

  • Restores @shopify/checkout-sheet-kit to 3.9.0 while preserving the v3 public async API.
  • Keeps the JavaScript API compatible with both TurboModule and legacy NativeModules resolution.
  • Restores old/new architecture support on Android and iOS by gating codegen/new-architecture dependencies and exporting legacy bridge Promise methods.
  • Uses the finalized native SDKs: Android 3.6.3 and iOS 3.8.2 which have been released under the release-v3 release branch for 3.8.x
  • Publishes React Native source and built declaration entry points so RN 0.81 transforms generated component specs correctly. Also prevents typecheck errors for consumers

How does Interop work

JS Layer

Before new arch we would access native modules via NativeModules.ShopifyCheckoutSheetKit, new arch is accessed via turbo modules TurboModuleRegistry.get(...)
We attempt turbo first, and fallback to native modules if it doesn't exist

Native Side

We have a few areas that are conditional to apply
On the iOS side we have to do conditional imports of turbo related headers and packaged via the #if RCT_NEW_ARCH_ENABLED directive and using the help-er install_modules_dependencies in the podspec

Gradle is a bit simpler because we just set a value in the env and pass it to a constructor for the react module

The rest of the native changes are reimplementing interfaces that the NativeModule system expects (e.g. getConstants / getName, and some of our bridge methods that are not codegenerated)

How to test

Builds have been distributed on Testflight and Play Store to tophat the build on New Arch.
I've done validation locally with new arch on and off and haven't run into any issues as of yet.


PR Checklist

Important

Releasing a new version of the kit?


Tip

See the Contributing documentation for instructions on how to publish a new version of the library.

Copy link
Copy Markdown
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@github-actions

github-actions Bot commented May 13, 2026

Copy link
Copy Markdown

Coverage Report

Lines Statements Branches Functions
Coverage: 99%
99.12% (227/229) 94.61% (123/130) 100% (67/67)

@kieran-osgood-shopify
kieran-osgood-shopify marked this pull request as ready for review May 13, 2026 09:07
@kieran-osgood-shopify
kieran-osgood-shopify requested a review from a team as a code owner May 13, 2026 09:07
@kieran-osgood-shopify
kieran-osgood-shopify force-pushed the kieran-osgood/cx-rn-v39-compat/dual-architecture branch from f6d38f0 to 8c2ef3f Compare May 13, 2026 09:35
@kieran-osgood-shopify
kieran-osgood-shopify force-pushed the kieran-osgood/cx-rn-v39-compat/dual-architecture branch from 6f03581 to 7d08692 Compare August 25, 2026 15:49
ShopifyCheckoutSheetKit.invalidate();
}

@ReactMethod(isBlockingSynchronousMethod = true)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI These all exist as turbo module plumbing - the typescript spec includes them modules/@shopify/checkout-sheet-kit/src/specs/NativeShopifyCheckoutSheetKit.ts but they're not actually run at runtime because we noop as we guard accelerated checkouts in JS via Platform.OS === 'ios'

@markmur

markmur commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

@kieran-osgood-shopify want to make this change too while you're changing this file?

image

Related:

Comment thread modules/@shopify/checkout-sheet-kit/src/context.tsx
Comment thread .github/workflows/ci.yml
@kieran-osgood-shopify
kieran-osgood-shopify force-pushed the kieran-osgood/cx-rn-v39-compat/dual-architecture branch from 980eba5 to 4aa378b Compare August 26, 2026 09:46
{
"name": "@shopify/checkout-sheet-kit",
"license": "MIT",
"version": "4.0.0",

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This makes sense as we decided not to publish v4 and ive fixed the breaking changes

@kieran-osgood-shopify
kieran-osgood-shopify merged commit 284084f into main Aug 26, 2026
8 checks passed
@kieran-osgood-shopify
kieran-osgood-shopify deleted the kieran-osgood/cx-rn-v39-compat/dual-architecture branch August 26, 2026 16:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants