Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix promise not resolving on IOS14 #1064

merged 1 commit into from Aug 4, 2020


Copy link

@iaphub iaphub commented Aug 3, 2020

Hey @hyochan,

We fixed an issue causing the requestSubscription or requestPurchase promise to not resolve on IOS 14 (Issue: #1058)
The issue is due to how react-native-iap is handling the promises, currently a key is generated (using RCTKeyForInstance) which is the pointer of the product identifier.
The problem is the pointer of transaction.payment.productIdentifier is actually different in the updatedTransactions method on IOS 14 causing the key to identify the promise to be different therefore the promise isn't found.
The solution in the pull request is to use directly the product identifier instead of the pointer value.

hyochan approved these changes Aug 4, 2020
Copy link

@hyochan hyochan left a comment

This sounds charming 🌻

@hyochan hyochan merged commit f7bc563 into dooboolab:master Aug 4, 2020
1 check passed
@hyochan hyochan added the 🛠 bugfix All kinds of bug fixes label Aug 4, 2020
Copy link

IKIGUYZ commented Oct 12, 2020

Work in IOS 14 but error in IOS 13, 12...

Copy link
Collaborator Author

iaphub commented Oct 12, 2020

Hey @Hobahung, just tested on IOS 12 and no issue.
What's your problem exactly?

Copy link

IKIGUYZ commented Oct 13, 2020

Dear @iaphub iap

It works well when it's not case renew, or renew less than 2 action. This error occurs when I renew an Non-Renewing Subscription or Consumable item several times a day. However, only the error on IOS is less than 14. The RNIap.requestPurchase function still returns the result on IOS14, however it doesn't work on iOS 10 or 12. I am also investigating the cause of this problem. Issue when i click buy button in attached photo. Please see attached photo.


Copy link

trinhvanminh2009 commented Nov 19, 2020

I upgraded to the latest version 4.6.3 and it still not work on requestPurchase vs getSubscriptions. IOS 14

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
🛠 bugfix All kinds of bug fixes
None yet

Successfully merging this pull request may close these issues.

None yet

4 participants