-
-
Notifications
You must be signed in to change notification settings - Fork 695
Closed
Description
Description
Then using useIAP() hook on tvOS (via react-native-tvos), the app crashes immediately with:
WARN [RN-IAP] [purchaseErrorListener] Nitro not ready yet; listener inert until initConnection()
WARN [RN-IAP] [promotedProductListenerIOS] Nitro not ready yet; listener inert until initConnection()
ERROR [RN-IAP] Failed to initialize IAP connection: [Error: Nitro runtime not installed yet. Ensure react-native-nitro-modules is initialized before calling IAP.]
ERROR [RN-IAP] initConnection failed: [[react-native-iap]: PurchaseError: Nitro runtime not installed yet. Ensure react-native-nitro-modules is initialized before calling IAP.]
The issue occurs because react-native-nitro-modules is not fully initialized when the component mounts on tvOS. This works fine on iOS.
Environment
- react-native-tvos: 0.81-stable
- react-native-iap: 14.7.7
- react-native-nitro-modules: 0.33.7
- expo: 54.0.0
- Platform: tvOS (Apple TV)
How to reproduce
Clone this project
https://github.com/MatheoElieG/react-native-iap-issue
Run the basic app in an AppleTV emulator and the issue will occur
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels