React-native-iap: getAvailablePurchases and Promo Codes

Created on 13 Aug 2018  路  10Comments  路  Source: dooboolab/react-native-iap

Version of react-native-iap

0.3.23

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

iOS

Actual behavior

I have 2 devices with the same Apple ID.
2 different items bought with promo code (Non-consumable)
When calling getAvailablePurchases only the purchase made from the other device is restored.
If I restore on a 3rd device, both items is restored.

In short: In app products 'bought' by promo codes, does not unlock on the device, it was redeemed on. But it unlocks on the user's other device(s).

Expected behavior

All purchases, promo code or not, restored on all devices.

Tested environment (Emulator? Real Device?)

Real devices on App Store version

Maybe this is not a problem with this module.
But I find it hard to test and any help is appreciated.

Update:
I have added some logging for the production app.
And I can confirm that the only thing returned when restoring, is the product unlocked on the other device.

馃摫 iOS 馃檹 help wanted

All 10 comments

I cannot understand what your question means.
I guess you are testing restoring non-consumable products.
I suggest you to make a new sandbox tester and test from the scratch.
Your question looks irrelevant to this module itself.

I have updated original post.
It may be irrelevant, I honestly don't know. It's a really weird behavior

No one who know, what may cause this?

After a bit more research I have found out Promo Codes does only work in production environment.
I cannot test it in sandbox.

Update:
I have added some logging for the production app.
And I can confirm that the only thing returned when restoring, is the product unlocked on the other device.

I found same symptom here, but it doesn't help.
https://github.com/bizz84/SwiftyStoreKit/issues/113
I hope when you test, erase the app, turn off the device.
@Hjord Thank you for your post.

I just tried uninstalling the app, restart the phone, install the app and restore.
Same thing happens.

I have tried with a newly create Apple ID. Here it works as expected.

Are there any updates on this issue yet?

It seems to only happen with older Apple accounts, since when creating a new one and testing the same functionality, it works as expected. With multiple older accounts though, the problem still occurs.

On older devices, when you redeem the promo code via the App Store, and try restoring the purchase (on the same device), it will not show the redeemed purchase. However when restoring the purchase on another device (that was redeemed via promo codes on device 1), it shows up as expected.

It might or might not be a package-specific problem. Please let us know, if anyone finds a solution or workaround for this problem.

@Hjord can you try this again with the new update which is 2.2.0? We've made some fixes and want to know if it resolves your symptoms.

As @Hjord said, I guess the issue is not a problem in real Apple ID.
iOS IAP test is really sucks. I hope Apple do better.
I close this issue.

I just tried uninstalling the app, restart the phone, install the app and restore.
Same thing happens.

I have tried with a newly create Apple ID. Here it works as expected.

Was this page helpful?
0 / 5 - 0 ratings