Skip to content

Commit d0cd665

Browse files
feat!: bump to v4.0.0 (New Architecture Release) (#467)
## v4.0.0 — React Native New Architecture v4 is a breaking release. The library now requires the React Native **New Architecture** (TurboModules + Fabric) and no longer supports the legacy bridge. Apps that are still on the old architecture should stay on the `3.x` line. ## Changelog ### Breaking changes **New Architecture is now required.** - Consumers must have `newArchEnabled=true` on Android and `:new_arch_enabled => true` in the iOS `Podfile`. - See the React Native upgrade guide for migration help: https://reactnative.dev/docs/the-new-architecture/use-the-new-architecture **Several promise-returning APIs are now synchronous.** Drop `await` from call sites: | API | Before | After | |-----|--------|-------| | `getConfig()` | `Promise<Configuration>` | `Configuration` | | `setConfig(config)` | `Promise<void>` | `void` | | `configureAcceleratedCheckouts(config)` | `Promise<boolean>` | `boolean` | | `isAcceleratedCheckoutAvailable()` | `Promise<boolean>` | `boolean` | | `isApplePayAvailable()` | `Promise<boolean>` | `boolean` | ```diff - const config = await shopify.getConfig(); + const config = shopify.getConfig(); - await shopify.setConfig({preloading: true}); + shopify.setConfig({preloading: true}); - const available = await shopify.isAcceleratedCheckoutAvailable(); + const available = shopify.isAcceleratedCheckoutAvailable(); ``` ### Under the hood - Native modules migrated from legacy bridge (`RCT_EXTERN_MODULE` / `ReactPackage`) to TurboModules (`NativeShopifyCheckoutSheetKitSpecBase` on iOS, `TurboReactPackage` on Android). - Old-architecture conditional code paths removed from `RNShopifyCheckoutSheetKit.podspec` and Android `build.gradle`. - `AcceleratedCheckoutButtons` now registered via `codegenNativeComponent`. - Added runtime coercion for `colorScheme` / `logLevel` values returned by `getConfig()` — unknown values from native now fall back to safe defaults (`automatic` / `error`) rather than silently passing through as untyped strings. ### Migration checklist - [ ] Enable New Architecture in your app (see React Native docs) - [ ] Remove `await` from the five APIs listed above - [ ] Reinstall pods: `cd ios && bundle exec pod install`
1 parent 01be71e commit d0cd665

4 files changed

Lines changed: 20 additions & 5 deletions

File tree

README.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ which enables developers to delivery best-in-class iOS and Android commerce
2424
experiences.
2525

2626
- [Platform Requirements](#platform-requirements)
27+
- [Version Compatibility](#version-compatibility)
2728
- [Getting Started](#getting-started)
2829
- [1. Installation](#1-installation)
2930
- [2. Minimum Android requirements](#2-minimum-android-requirements)
@@ -64,10 +65,24 @@ experiences.
6465

6566
## Platform Requirements
6667

67-
- **React Native** - Minimum version `0.70`
68+
- **React Native** - Minimum version `0.76` (v4+) / `0.70` (v3 and earlier)
6869
- **iOS** - Minimum version iOS 13
6970
- **Android** - Minimum Java 11 & Android SDK version `23`
7071

72+
## Version Compatibility
73+
74+
Starting with **v4.0.0**, `@shopify/checkout-sheet-kit` requires the React Native
75+
**New Architecture** (TurboModules + Fabric). Apps on the old architecture must
76+
stay on the `v3.x` line until they migrate.
77+
78+
| Package version | React Native | Architecture |
79+
| --------------- | -------------- | ------------------ |
80+
| `4.x` | `>= 0.76` | New Architecture |
81+
| `3.x` | `>= 0.70` | Old Architecture |
82+
83+
See the [React Native upgrade guide](https://reactnative.dev/docs/the-new-architecture/use-the-new-architecture)
84+
for help enabling the New Architecture in your app.
85+
7186
## Getting Started
7287

7388
Shopify Checkout Kit is an open-source NPM package.

dev.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ up:
1010
- sccache
1111
- ruby
1212
- xcode:
13-
version: "26.2"
13+
version: '26.2'
1414
runtimes:
1515
ios:
1616
- version: 23C54 # 26.2

modules/@shopify/checkout-sheet-kit/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@shopify/checkout-sheet-kit",
33
"license": "MIT",
4-
"version": "3.8.0",
4+
"version": "4.0.0",
55
"main": "lib/commonjs/index.js",
66
"types": "src/index.ts",
77
"source": "src/index.ts",

sample/ios/Podfile.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2578,7 +2578,7 @@ PODS:
25782578
- ReactCommon/turbomodule/core
25792579
- SocketRocket
25802580
- Yoga
2581-
- RNShopifyCheckoutSheetKit (3.8.0):
2581+
- RNShopifyCheckoutSheetKit (4.0.0):
25822582
- boost
25832583
- DoubleConversion
25842584
- fast_float
@@ -2996,7 +2996,7 @@ SPEC CHECKSUMS:
29962996
RNGestureHandler: eeb622199ef1fb3a076243131095df1c797072f0
29972997
RNReanimated: 237d420b7bb4378ef1dacc7d7a5c674fddb4b5d2
29982998
RNScreens: 3fc29af06302e1f1c18a7829fe57cbc2c0259912
2999-
RNShopifyCheckoutSheetKit: 0da44f403a7176465fd25aa58c6fe9edfc95353b
2999+
RNShopifyCheckoutSheetKit: 2a8c97d7780466538843d4cb1368c7ed76a33689
30003000
RNVectorIcons: be4d047a76ad307ffe54732208fb0498fcb8477f
30013001
ShopifyCheckoutSheetKit: 5253ca4da4c4f31069286509693930d02b4150d8
30023002
SocketRocket: d4aabe649be1e368d1318fdf28a022d714d65748

0 commit comments

Comments
 (0)