iosreact-nativein-app-purchase

React-Native-iap getProducts() returns empty array


Version of react-native-iap 3.3.7

Version of react-native 0.60.4

Platforms you faced the error (IOS or Android or both?) only on ios

Expected behavior getProducts returns array of products

Actual behavior returns empty array it is working well on android

Tested environment (Emulator? Real Device?) Emulator and Real Device

Addition All in app purchase products were already approved in app store. I also tried to use version 4.4.8, but no difference. :( Please help me.


Solution

  • When products aren't fetched, it's most likely some configuration issue. On iOS the most likely culprits are:

    1. The products are not in the 'Ready To Submit' state (make sure you've added the screenshot).
    2. You haven't signed your Paid Applications Agreement in App Store Connect
    3. You're testing on an emulator instead of a physical device.

    If your products were already approved, and you've tried on a physical device, I'd double check #2 and make sure you have the latest Paid Applications Agreement signed.

    Here's a handy post on the topic from RevenueCat, some is RevenueCat specific but most of the checklist applies to any app.