Open amiroucheoussama opened 1 year ago
same error react-native-iap: 12.10.7 react-native: 0.66.5 Platforms : IOS, simulator
same error react-native-iap: 12.10.7 react-native: 0.66.5 Platforms : IOS, simulator
Have you completed your agreements and banking and tax section ? do you have free pr paid apps ?
status: Ready to Submit is ok?
status: Ready to Submit is ok?
how about agreements and banking ? do you have paid apps or free apps ?
Did you try with the full product id for your SKU. You can see this in the subscriptions -> group page
Getting this same issue, any update here? It was working fine for me, went on vacation, came back and now getting empty arrays for subscriptions and products.
@amiroucheoussama did you manage to find a solution?
I’m having the same problem, have you found a solution? @benminor @amiroucheoussama
having the same problem
having the same issue on iOS on first load, second attempt works
Same here. In my case sometimes it works and sometimes not. My connection is definitely initialized - I have a log entry when that happens and that's done at app-start. One thing I noticed is that since it seems to work properly the SECOND time, I just added a useEffect to force it to trigger twice:
useEffect(() => {
getAvailablePurchases().catch((e) => console.log('[IAP] Error loading available purchases', e));
getProducts({skus: SKUS}).catch((e) => console.log('[IAP] Eror loading products', e));
getSubscriptions({skus: SKUS}).catch((e) => console.log('[IAP] Error loading subscriptions', e));
}, [getAvailablePurchases, getProducts, getSubscriptions]);
Trim as needed for the functions you use. This seems to kick the system into gear and the useIAP
hook helpers return valid product arrays for me after that.
I have the same problem
+1
Same here
m2 +1
I can confirm calling RNIap.getSubscriptions
twice makes it work!! (back to CS101 boyz)
Hey all! I had the issue where subscriptions were empty arrays, even after trying to call getSubscriptions twice. Turns out I needed to get the Paid App Agreement signed from App Store Connect. Hope this helps people who skimmed through the instructions on testing like this guy did...
Although I confirmed the permissions, the products were coming empty array, this problem was fixed when I tried with the real device
You need the Paid Apps
agreement to use IAP
Check your storekit config file in xcode scheme
make sure you have choose one
I need these thing to able to fetch products on iOS
Ready to Submit
✅ In-App Purchases and Subscriptions
✅ getProducts({ skus: ['your_product_sku']})
as normal guide ✅ I use Expo to develop app. The funniest thing is I need to do all the step from above to able to make react-native-iap
works BUT after that I could completely remove the ios and android folder to generate them again by execute npx expo prebuild --clean
, and then just npx expo run ios
, it works (even this case the StoreKit is no longer exist in ios folder)
That's weird.
Update: The weird thing from above is products cached on device, whenever you remove app and run iOS again you will got an empty array of product.
Description
getProducts and getSubscriptions from useIAP hook return always undefined and products and subscriptions are always empty arrays. 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. Screenshots
Environment:
To Reproduce Steps to reproduce the behavior:
HINT: my app is not published and noy 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.
EDIT: I found that in my agreements section, i have an agreement for free apps, can it be the problem ?