I'm working on an iOS app built with Expo Application Services (EAS) and encountering issues with the react-native-iap library:
getProducts({skus: ['Credits30']})
unexpectedly returns undefined.requestPurchase({ sku: 'Credits30' })
results in an error: "Invalid product ID".
Despite researching extensively and following documentation and related SO questions (links provided), the issue persists:
- Fluffys Zero IAP Products Checklist
- React Native IAP Troubleshooting
- SO - Retrieving In App Purchase products that has not been submitted yet?
Here's a detailed checklist of what I've verified:
Tax and Banking:
- Active paid Apple developer account.
- Active agreements for free and paid apps.
- Tax and Banking info provided in App Store Connect.
App setup:
- App created in App Store Connect with matching App ID.
- Matching bundle ID in EAS build and App Store Connect.
- Enabled in-app purchases in the app's provisioning profile.
- In-app purchase items in App Store Connect set to 'Ready to Submit'.
Client-side:
- Using correct product IDs.
- Waited several days after creating in-app purchase items.
- As suggested here, I've tried calling initConnection before calling getProducts/requestPurchase. initConnection returns 'true'.
- Same issue occurs in both Simulator and on physical device with development build.
I have a few questions that may help ellucidate the issue:
- Can I fetch products if the app's status is 'Prepare for Submission', or does it need to be under review or launched?
- Do I need to add any specific configuration in app.config.js for IAP?
- Is there any eas.json configuration I might be missing?
- Regarding Sandbox testing: is it necessary for product fetching, and if so, how can I add a Sandbox tester in an EAS built app since the option doesn't appear in Settings > App Store?
I'm using React Native ["0.72.4"], react-native-iap ["^12.10.7"], and Expo ["^49.0.10"].
Would really appreciate any help or insight as I've been trying to pinpoint the issue for several days now!