From a9d31ef064ebf47d76bd0ad89d9342973fcab167 Mon Sep 17 00:00:00 2001 From: Aryeh Stiefel Date: Tue, 24 Mar 2026 16:42:00 -0400 Subject: [PATCH] fix: use platform-specific stubs for Apple Pay and Google Pay native components --- example/ios/Podfile.lock | 4 ++-- scripts/update-sdk-version.js | 1 - src/payments/ApplePay.android.tsx | 4 ++++ src/payments/GoogleWallet.ios.tsx | 4 ++++ src/telemetry/sdkVersion.ts | 2 +- 5 files changed, 11 insertions(+), 4 deletions(-) create mode 100644 src/payments/ApplePay.android.tsx create mode 100644 src/payments/GoogleWallet.ios.tsx diff --git a/example/ios/Podfile.lock b/example/ios/Podfile.lock index 85b82d6..fc25e13 100644 --- a/example/ios/Podfile.lock +++ b/example/ios/Podfile.lock @@ -1,5 +1,5 @@ PODS: - - BoltReactNativeSdk (0.4.0): + - BoltReactNativeSdk (0.5.2): - hermes-engine - RCTRequired - RCTTypeSafety @@ -2063,7 +2063,7 @@ EXTERNAL SOURCES: :path: "../../node_modules/react-native/ReactCommon/yoga" SPEC CHECKSUMS: - BoltReactNativeSdk: 040ede4932480f767536ea24dde9f7f088134947 + BoltReactNativeSdk: e8986a6326b43623245c77286fa5d5ad6ab23f43 FBLazyVector: c12d2108050e27952983d565a232f6f7b1ad5e69 hermes-engine: f4f579ea06f83a03800993f3f445a5025f78f893 RCTDeprecation: 3280799c14232a56e5a44f92981a8ee33bc69fd9 diff --git a/scripts/update-sdk-version.js b/scripts/update-sdk-version.js index bd50923..b4196f5 100644 --- a/scripts/update-sdk-version.js +++ b/scripts/update-sdk-version.js @@ -16,4 +16,3 @@ const OUT = path.join(ROOT, 'src', 'telemetry', 'sdkVersion.ts'); const content = `// Auto-updated by scripts/update-sdk-version.js during release. Do not edit manually.\nexport const SDK_VERSION = '${version}';\n`; fs.writeFileSync(OUT, content, 'utf8'); -console.log(`SDK_VERSION set to ${version}`); diff --git a/src/payments/ApplePay.android.tsx b/src/payments/ApplePay.android.tsx new file mode 100644 index 0000000..99872b8 --- /dev/null +++ b/src/payments/ApplePay.android.tsx @@ -0,0 +1,4 @@ +// Android stub — Apple Pay is iOS only. +// Metro resolves this file on Android, preventing NativeApplePayButton from loading +// (which calls codegenNativeComponent('BoltApplePayButton') — not registered on Android). +export const ApplePay = () => null; diff --git a/src/payments/GoogleWallet.ios.tsx b/src/payments/GoogleWallet.ios.tsx new file mode 100644 index 0000000..47cb085 --- /dev/null +++ b/src/payments/GoogleWallet.ios.tsx @@ -0,0 +1,4 @@ +// iOS stub — Google Pay is Android only. +// Metro resolves this file on iOS, preventing NativeGooglePayButton from loading +// (which calls codegenNativeComponent('BoltGooglePayButton') — not registered on iOS). +export const GoogleWallet = () => null; diff --git a/src/telemetry/sdkVersion.ts b/src/telemetry/sdkVersion.ts index 7325790..c77aa7b 100644 --- a/src/telemetry/sdkVersion.ts +++ b/src/telemetry/sdkVersion.ts @@ -1,2 +1,2 @@ // Auto-updated by scripts/update-sdk-version.js during release. Do not edit manually. -export const SDK_VERSION = '0.5.0'; +export const SDK_VERSION = '0.5.2';