react-native-iap: [IOS 17] requestSubscripition infinite loop

Description

when i test a request subscription i have the pop up but when i succeed payment in pop up the pop up come and thats situation loop. no purchaseupdatelistener fire and the buy pop up come over and over until you exit

Expected Behavior

the pop up open, when payment it’s done, purchaseupdatelistener need to fire

Screenshots

Environment:

  • react-native-iap:
  • react-native:
  • Platforms (iOS, Android, emulator, simulator, device):

To Reproduce Steps to reproduce the behavior:

i’m on ios simulator

  1. requestSubscription({sku: subscriptions[0]["productId"]}) in a button for example and an purchaseupdatedlistener function
  2. Press the button
  3. no purchaseupdatelistener fire and the buy pop up come over and over until you exit

About this issue

  • Original URL
  • State: open
  • Created 8 months ago
  • Reactions: 8
  • Comments: 15

Most upvoted comments

For anyone experimenting this issue that does not have real device. You need to setup StoreKit and run the app by XCode not by console

https://developer.apple.com/documentation/storekit/in-app_purchase/original_api_for_in-app_purchase/testing_in-app_purchases_in_xcode?language=objc

Solved by building in Xcode instead of with command line

As it is write in Troubleshooting here, It isn’t work on simulator you need to use physical device and i don’t know why 😕

For that’s, i connected an iphone on developer mode with xcode and i used expo run:ios --device=devicename. Search here fro more info You need to be sure you are on the same wifi as your device and you authorize the connexion to your mac on Wan. it is important for expo

if you need more info i can help !