getProducts and getSubscriptions from useIAP hook return always undefined and products and subscriptions are always empty arrays. getProducts imported from react-native-iap is also returning an empty array but getSubscriptions is undefined.
Expected Behavior
I am trying to fetch products from apple but i'm getting undefined or empty array, i completed all steps about configuring in app purchases in app store connect, i added product skus. I am expecting to receive an array of my products added earlier in app store connect.
You can take look to screenshots for further explanation about my in app purchases products and how i'm fetching them in my app. screenshots provide used code.
Environment:
react-native-iap: 12.10.7 react-native: 0.71.8 Platforms (iOS, Android, emulator, simulator, device): IOS, simulator
Steps to reproduce the behavior:
- add in app purchase in app store connect and in make available in xcode
- add in app purchase products
- try to fetch them from ios app in ios simulator
Additional context:
The app is not published and not yet submitted in app store or testflight, i have not uploaded any bundle to app store yet, i'm matching the sku in app store with bundle identifier in xcode.
In agreements and banking section, i have an agreement for free apps, can it be the problem ?
All solutions in already opened issues in SO were tested without success.



I've got similar problems. Maybe try to use
getAvailablePurchasesinstead ofgetProducts. As I understand,getAvailablePurchasesis for non-consumables.