Platform & Versions
React Native: 0.85.3 Expo SDK: 56 react-native-iap: 15.3.3 iOS: 18.7.8 Device: iPhone 16 Pro Distribution: TestFlight (distribution: "store" via EAS Build)
Problem
In a TestFlight build (App Store distribution, not ad-hoc), calling initConnection() from react-native-iap throws a TypeError: "undefined is not a function" on iOS. This happens on every app launch. The error is caught in a try/catch around initConnection() and we never reach getSubscriptions() or purchaseUpdatedListener().
The app never connects to StoreKit. All IAP attempts fail immediately with "Store unavailable."
What we've confirmed
- Sandbox tester account is configured in Settings → App Store → Sandbox Account
- "Allow Purchases & Renewals" is ON in the Sandbox Testing screen
- An active sandbox subscription exists (visible in Settings → App Store → Sandbox Account → Subscriptions), meaning StoreKit was reachable at some earlier point
- react-native-iap is listed in the Expo config plugins in app.json — EAS should be linking StoreKit.framework and adding the com.apple.developer.in-app-payments entitlement
- Built with --clear-cache to force a clean native project generation
- All 5 IAP product IDs (2 subscriptions, 3 consumables) are linked to the app version in App Store Connect and are in "Ready to Submit" state
- ITSAppUsesNonExemptEncryption is set to false in Info.plist
Code
try {
await initConnection(); // throws "undefined is not a function"
// never reaches here
await getSubscriptions({ skus: ['com.smartailearning.iem.pro.yearly', 'com.smartailearning.iem.pro.monthly'] });
} catch (e) {
console.error(e.message); // "undefined is not a function"
}
Question
Is react-native-iap v15 incompatible with React Native 0.85 / Expo SDK 56 on iOS? Is there a known issue with the StoreKit native module not loading in EAS-managed builds? Should we be using StoreKit directly via a custom native module instead?