-
Notifications
You must be signed in to change notification settings - Fork 7
Description
Description
After upgrading our app from Expo SDK 52 to Expo SDK 54, the iOS app now crashes immediately on startup when using mobile-payments-sdk-react-native. This did not occur on Expo SDK 52.
The crash happens during native module initialization, before any payment-related JavaScript code runs.
Note: The app is running with React Native New Architecture enabled.
Environment
- Expo SDK: 54 (from 52)
- React Native: 0.81+
- Architecture: New Architecture enabled
- mobile-payments-sdk-react-native: 2025.12.1
- Platform: iOS (Simulator, Apple Silicon)
- Workflow: Expo managed
- Package manager: Yarn
Steps to Reproduce
yarn iosActual Behavior
App crashes with a SIGTRAP / EXC_BREAKPOINT.
Crash report excerpt:
Thread 0 Crashed:
0 libswiftCore.dylib _assertionFailure(_:_:file:line:flags:)
1 SquareMobilePaymentsSDK
2 MobilePaymentsSdkReactNative.init()Based on the stack trace and reviewing the SDK source, the assertion appears to be triggered during initialization of the mockReaderUI lazy property in MobilePaymentsSdkReactNative (around line ~237):
private lazy var mockReaderUI: MockReaderUI? = {
do {
return try MockReaderUI(for: mobilePaymentsSDK)
} catch {
assertionFailure("Could not instantiate a mock reader UI: \(error.localizedDescription)")
return nil
}
}()
This assertion fires during module construction, before any JavaScript code executes, causing an immediate app crash.
Expected Behavior
App should launch normally, as it did on Expo SDK 52.
Questions
- Is Expo SDK 54 supported by mobile-payments-sdk-react-native v2025.12.1?
- Are there required changes for Expo SDK 54 compatibility?
Additional Notes
- According to the changelog, v2025.2.0 fixed "an issue with the MockReaderUI dependency for release build configurations" but this crash still occurs in v2025.12.1 with React Native 0.81+
- Attempted workaround: Patching the SDK to replace assertionFailure() with print() fixes this specific crash but reveals a secondary compatibility issue (NativeEventEmitter requires non-null arguments in React Native 0.81+), so the SDK still doesn't work with React Native 0.81+