question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

RNIap.requestPurchase have no resolved promise result on iOS 14.0 version

See original GitHub issue

Version of react-native-iap

4.4.8, 4.5.0

Version of react-native

0.61.5

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

IOS (14.0)

Expected behavior

requestSubscription and requestPurchase methods should resolve promise on sucessful purchase.

Actual behavior

purchaseUpdatedListener receives the result of successful purchase but RNIap.requestPurchase(sku, false) and RNIap.requestSubscription(sku, false) have no resolved promise result. Actually there is no success callback execution. It works fine in previous ios versions and in android.

Tested environment (Emulator? Real Device?)

both

Steps to reproduce the behavior

  1. Set up purchases.
  2. Get real device with ios 14.0 or emulator with working StoreKit
  3. Try to get console.log from successful purchase:
RNIap.requestPurchase(sku, false).then(result => {console.log('result', result)});
//or
RNIap.requestSubscription(sku, false).then(result => {console.log('result', result)});

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:3
  • Comments:7

github_iconTop GitHub Comments

2reactions
iaphubcommented, Aug 3, 2020

Just submitted a pull request to fix the issue. As soon as it is accepted, we will update react-native-iaphub to the latest version of react-native-iap with the fix 👍

1reaction
VEnom42commented, Aug 6, 2020

Fixed in 4.5.2.

Read more comments on GitHub >

github_iconTop Results From Across the Web

react-native-iap - npm
This react-native module will help you access the In-app purchases capabilities of your phone on the Android , iOS platforms and the Amazon ......
Read more >
Using .then(), .catch(), .finally() to Handle Errors in Javascript ...
Once a Promise has been settled (rejected or resolved) it cannot be re-settled; this immutability is important. This came in handy recently when...
Read more >
Implementing Promises in Swift - Pierre Felgines
We will implement resolve in a moment, when all the errors will be taken care of. The next one is simple, the method...
Read more >
React Native scene doesn't update from Parse promise
All I'm doing is passing a navigator object a new route. "Login successful" and "Navigate function called" are both outputted to the console,...
Read more >
How to Handle Promises in React - Upmostly
To work these into the React lifecycle, we can use the useState hook to store the result of the promise when it is...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found