From 43c4af7261b8cebde73fc16135bd8a94acffc961 Mon Sep 17 00:00:00 2001 From: Artem Chubaryan Date: Wed, 3 Jun 2026 23:42:32 -0500 Subject: [PATCH 1/3] Bump IAP SDK to Android 1.6.8 / iOS 1.6.6 --- CHANGELOG.md | 4 ++++ README.md | 2 +- SquareInAppPayments.podspec | 4 ++-- package.json | 2 +- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a96d7b8d..e510bc0e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ ## Changelog +### v2.0.1 Jun 4, 2026 + +* Upgrade IAP SDK for Android `1.6.8` and for iOS `1.6.6`. + ### v1.7.6 Jun 03, 2024 * Upgrade IAP SDK for Android `1.6.6` and for iOS `1.6.3`. diff --git a/README.md b/README.md index c1b78549..c1774141 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ The In-App Payments plugin for Square [In-App Payments SDK] is a wrapper for the native Android and iOS SDKs and supports the following native In-App Payments SDK versions: - * iOS: `1.6.5` + * iOS: `1.6.6` * Android: `1.6.8` ## Additional documentation diff --git a/SquareInAppPayments.podspec b/SquareInAppPayments.podspec index 5d05f4d1..7d5d90d3 100644 --- a/SquareInAppPayments.podspec +++ b/SquareInAppPayments.podspec @@ -24,7 +24,7 @@ Pod::Spec.new do |s| s.dependency 'SquareInAppPaymentsSDK', $sqipVersion s.dependency 'SquareBuyerVerificationSDK', $sqipVersion else - s.dependency 'SquareInAppPaymentsSDK', '1.6.5' - s.dependency 'SquareBuyerVerificationSDK', '1.6.5' + s.dependency 'SquareInAppPaymentsSDK', '1.6.6' + s.dependency 'SquareBuyerVerificationSDK', '1.6.6' end end diff --git a/package.json b/package.json index ac1bca4a..ae328851 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-native-square-in-app-payments", - "version": "2.0.0", + "version": "2.0.1", "description": "An open source React Native plugin for calling Square’s native In-App Payments SDK to take in-app payments on iOS and Android.", "main": "./lib/module/index.js", "types": "./lib/typescript/src/index.d.ts", From d11379e17c215c1eac1da6d438849471e32b828b Mon Sep 17 00:00:00 2001 From: Artem Chubaryan Date: Thu, 4 Jun 2026 17:38:49 -0500 Subject: [PATCH 2/3] chore: bump IAP SDK to iOS 1.6.7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit iOS 1.6.7 is a patch on top of 1.6.6 that fixes public-header imports in the shipped `SquareInAppPaymentsSDK` and `SquareBuyerVerificationSDK` xcframeworks. System-framework imports in public headers were using the `@import Foundation;` / `@import UIKit;` module syntax, which fails to resolve in some third party consumer build contexts (bridging headers with `-fno-modules`, mixed-language targets, etc.). 1.6.7 switches them to `#import `, which works in both module and non-module contexts. ## Changes - `SquareInAppPayments.podspec` — `SquareInAppPaymentsSDK` / `SquareBuyerVerificationSDK` fallback pin `1.6.6` → `1.6.7` - `ios/internal/SQIPBuyerInternal.m` — fix a pre-existing race where `SQIPBuyerVerificationSDK.shared.verifyWithParameters:viewController:` was handed a presenter whose dismissal was still in flight. Under the new React Native architecture, `RCTFabricModalHostViewController` enforces an in-window-hierarchy check and refuses to be a presenter mid-dismissal, producing: "Attempt to present ThreeDS_SDK.CustomizedNavController ... whose view is not in the window hierarchy". Now we wait for `dismissViewControllerAnimated: completion:` to finish, re-query `activeRootViewController`, and present the verification flow from inside the completion block. --- SquareInAppPayments.podspec | 4 +- ios/internal/SQIPBuyerInternal.m | 82 +++++++++++++++++++------------- 2 files changed, 50 insertions(+), 36 deletions(-) diff --git a/SquareInAppPayments.podspec b/SquareInAppPayments.podspec index 7d5d90d3..c9f89333 100644 --- a/SquareInAppPayments.podspec +++ b/SquareInAppPayments.podspec @@ -24,7 +24,7 @@ Pod::Spec.new do |s| s.dependency 'SquareInAppPaymentsSDK', $sqipVersion s.dependency 'SquareBuyerVerificationSDK', $sqipVersion else - s.dependency 'SquareInAppPaymentsSDK', '1.6.6' - s.dependency 'SquareBuyerVerificationSDK', '1.6.6' + s.dependency 'SquareInAppPaymentsSDK', '1.6.7' + s.dependency 'SquareBuyerVerificationSDK', '1.6.7' end end diff --git a/ios/internal/SQIPBuyerInternal.m b/ios/internal/SQIPBuyerInternal.m index c3fe16e9..c666f384 100644 --- a/ios/internal/SQIPBuyerInternal.m +++ b/ios/internal/SQIPBuyerInternal.m @@ -37,49 +37,63 @@ + (void)startBuyerVerificationFlow:(nonnull NSString *)paymentSourceId [SQIPBuyerAction fromStringDictionary:buyerActionString money:moneyMap]; SQIPContact *contact = [SQIPContact fromDictionary:contactMap]; - UIViewController *rootViewController = - [UiUtilities activeRootViewController]; - SQIPVerificationParameters *params = [[SQIPVerificationParameters alloc] initWithPaymentSourceID:paymentSourceId buyerAction:buyerAction locationID:locationId contact:contact]; - if ([rootViewController isKindOfClass:[UINavigationController class]]) { - [rootViewController.navigationController popViewControllerAnimated:YES]; - } else { - [rootViewController dismissViewControllerAnimated:YES completion:nil]; - } - - [SQIPBuyerVerificationSDK.shared verifyWithParameters:params - theme:[SQIPCardEntryInternal theme] - viewController:rootViewController - success:^(SQIPBuyerVerifiedDetails *_Nonnull verifiedDetails) { - NSDictionary *verificationResult = @{ - @"nonce" : paymentSourceId, - @"token" : verifiedDetails.verificationToken - }; - onBuyerVerificationSuccess(@[ verificationResult ]); - [SQIPBuyerInternal shouldContinue]; - } - failure:^(NSError *_Nonnull error) { - NSString *debugCode = error.userInfo[SQIPErrorDebugCodeKey]; - NSString *debugMessage = error.userInfo[SQIPErrorDebugMessageKey]; - if (_mockBuyerVerification) { - NSDictionary *verificationResult = - @{@"nonce" : paymentSourceId, @"token" : @"mock-token"}; + // Capture the success/failure blocks so we can present from the dismissal + // completion handler. We need to wait for any in-progress dismissal to + // finish before handing 3DS_SDK a presenter — otherwise it tries to + // present on a VC whose view is mid-removal from the window hierarchy, + // which surfaces as "view is not in the window hierarchy" under the new + // React Native architecture (RCTFabricModalHostViewController). + void (^presentVerification)(void) = ^{ + UIViewController *presenter = [UiUtilities activeRootViewController]; + [SQIPBuyerVerificationSDK.shared verifyWithParameters:params + theme:[SQIPCardEntryInternal theme] + viewController:presenter + success:^(SQIPBuyerVerifiedDetails *_Nonnull verifiedDetails) { + NSDictionary *verificationResult = @{ + @"nonce" : paymentSourceId, + @"token" : verifiedDetails.verificationToken + }; onBuyerVerificationSuccess(@[ verificationResult ]); [SQIPBuyerInternal shouldContinue]; - } else { - [SQIPBuyerInternal invalidateShouldContinue]; - onBuyerVerificationFailure(@[ [ErrorUtilities - callbackErrorObject:RNSQIPUsageError - message:error.localizedDescription - debugCode:debugCode - debugMessage:debugMessage] ]); } - }]; + failure:^(NSError *_Nonnull error) { + NSString *debugCode = error.userInfo[SQIPErrorDebugCodeKey]; + NSString *debugMessage = error.userInfo[SQIPErrorDebugMessageKey]; + if (_mockBuyerVerification) { + NSDictionary *verificationResult = + @{@"nonce" : paymentSourceId, @"token" : @"mock-token"}; + onBuyerVerificationSuccess(@[ verificationResult ]); + [SQIPBuyerInternal shouldContinue]; + } else { + [SQIPBuyerInternal invalidateShouldContinue]; + onBuyerVerificationFailure(@[ [ErrorUtilities + callbackErrorObject:RNSQIPUsageError + message:error.localizedDescription + debugCode:debugCode + debugMessage:debugMessage] ]); + } + }]; + }; + + UIViewController *activeViewController = + [UiUtilities activeRootViewController]; + + // If a modal (e.g. card entry) is on top, dismiss it first and only + // present verification once dismissal completes — `presentingViewController` + // is the VC the active modal will hand control back to. + if (activeViewController.presentingViewController != nil) { + [activeViewController.presentingViewController + dismissViewControllerAnimated:YES + completion:presentVerification]; + } else { + presentVerification(); + } }); } From a5838f5881637aa1eaa09321290adb2c5bea379d Mon Sep 17 00:00:00 2001 From: Artem Chubaryan Date: Thu, 4 Jun 2026 17:41:13 -0500 Subject: [PATCH 3/3] chore: update README and CHANGELOG for iOS 1.6.7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reflects the iOS 1.6.6 → 1.6.7 bump applied in the preceding commit. --- CHANGELOG.md | 2 +- README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e510bc0e..23e5557b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,7 @@ ### v2.0.1 Jun 4, 2026 -* Upgrade IAP SDK for Android `1.6.8` and for iOS `1.6.6`. +* Upgrade IAP SDK for Android `1.6.8` and for iOS `1.6.7`. ### v1.7.6 Jun 03, 2024 diff --git a/README.md b/README.md index c1774141..abded3f0 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ The In-App Payments plugin for Square [In-App Payments SDK] is a wrapper for the native Android and iOS SDKs and supports the following native In-App Payments SDK versions: - * iOS: `1.6.6` + * iOS: `1.6.7` * Android: `1.6.8` ## Additional documentation