TL;DR
Real purchases don't work in Expo Go. RevenueCat only runs a mock Preview API Mode there. Use a development build.
Configure the SDK once at startup with a per-platform public key.
Gate features on an entitlement ( pro ), never on product IDs.
purchasePackage throws when the user cancels. Check e.userCancelled and move on.
restorePurchases only from a button tap, never on launch.
Test with RevenueCat's Test Store first, then Apple/Google sandboxes before review.
1. Install and rebuild
npx expo install react-native-purchases react-native-purchases-ui expo-dev-client eas build --profile development --platform all
Enter fullscreen mode
Exit fullscreen mode
Skip the rebuild and you'll get `new NativeEventEmitter()` requires a non-null argument , which RevenueCat's docs call out directly.
2. Configure once
// app/_layout.tsx useEffect (() => { if ( __DEV__ ) Purchases . setLogLevel ( LOG_LEVEL . VERBOSE ); Purchases . configure ({ apiKey : Platform . OS === ' ios ' ? process . env .…