react-native-iap icon indicating copy to clipboard operation
react-native-iap copied to clipboard

getSubscriptions returns empty array on IOS (everything working fine on Android)

Open chrisdev0342 opened this issue 2 years ago • 20 comments

Description I am fetching renewable subscriptions in IOS, which always returns an empty array. Although everything is working fine on Android. I also tried to run requestSubscription with one of the sku but it throws an error:

E_DEVELOPER_ERROR Invalid product ID

I am trying to fetch like: const subscription = await RNIap.getSubscriptions({ skus: ["subscription_01", "subscription_01"] });

I've been struggling with this from past week, I have tried to push build to TestFlight and test but no success. Any help will be much appreciated.

Expected Behavior Ideally it should return an array of subscriptions just like Android.

Environment:

  • react-native-iap: 12.4.8
  • react-native: 0.70.5
  • Platforms (iOS, simulator, device):

chrisdev0342 avatar Jan 20 '23 12:01 chrisdev0342

Is this on a device with iOS 15 or newer? have you tried using Storekit2 mode?

andresesfm avatar Jan 20 '23 18:01 andresesfm

Is this on a device with iOS 15 or newer? have you tried using Storekit2 mode?

Yes, using StoreKit it works in debug mode but after deploying on TestFlight does not work.

chrisdev0342 avatar Jan 25 '23 18:01 chrisdev0342

I have seen this on other tickets. It might be the kind of subscription. For iOS 15+, using storekit2 mode seems to solve it.

andresesfm avatar Jan 30 '23 22:01 andresesfm

Any update on this? Is it confirmed that we need storekit2 mode for ios 15+? I thought storekit2 wasn't mandatory?

pierroo avatar Feb 14 '23 12:02 pierroo

This could be a configuration issue on the appstore,

andresesfm avatar Mar 13 '23 20:03 andresesfm

I am currently facing the same issue with subscriptions fetching an empty array. But let me try the Storekit2 mode and see how it goes.

5ylvino avatar Mar 27 '23 20:03 5ylvino

Wow! I woke up this morning, I did the Storekit configuration. And everything started working perfectly as supposed. Though, I ensured that everything matched the values I have on the apple console.

Thanks

5ylvino avatar Mar 28 '23 09:03 5ylvino

I've been facing this same issue of fetching empty array for about 2 weeks now

Please how do I use storekit2?

oloyedewaris avatar Apr 07 '23 20:04 oloyedewaris

@oloyedewaris follow the step in this documentation ===> https://www.revenuecat.com/blog/engineering/ios-in-app-subscription-tutorial-with-storekit-2-and-swift/#h-setting-up-app-store-connect

5ylvino avatar Apr 07 '23 22:04 5ylvino

I am getting the same error, but on purchase. I am using expo 49

itsdenispavlovic avatar Sep 15 '23 11:09 itsdenispavlovic

Is this on a device with iOS 15 or newer? have you tried using Storekit2 mode?

Yes, using StoreKit it works in debug mode but after deploying on TestFlight does not work.

i facing same problem.

also using setup({storekitMode:'STOREKIT2_MODE'})

sanjaysoalnki2000 avatar Dec 28 '23 07:12 sanjaysoalnki2000

I am also getting same issue

all steps done (storekit confiuguration) as described here: https://developer.apple.com/documentation/xcode/setting-up-storekit-testing-in-xcode#Enable-StoreKit-Testing-in-Xcode

but now getting empty array when try to fetch subscritions

inayatAliDev avatar May 13 '24 11:05 inayatAliDev

any updates on this issue?

anwargul0x avatar Jun 25 '24 15:06 anwargul0x

Commenting so this thread stays relevant!

Jova266 avatar Jul 17 '24 13:07 Jova266

Facing the same problem ):

devburiti avatar Jul 18 '24 18:07 devburiti

same problem here as well

yairvillarp avatar Jul 25 '24 19:07 yairvillarp

I solved the problem when I completed all the neccessery things in the Business tab in appstoreconnect. Tax forms, Bank account and Paid app agreement.

Jova266 avatar Jul 26 '24 10:07 Jova266

I am also getting same issue

all steps done (storekit confiuguration) as described here: https://developer.apple.com/documentation/xcode/setting-up-storekit-testing-in-xcode#Enable-StoreKit-Testing-in-Xcode

but now getting empty array when try to fetch subscritions

Solved after adding bank information which was necessary for paid agreement

inayatAliDev avatar Aug 01 '24 05:08 inayatAliDev