2.2.0 Version of react-native-iap
iOS Platforms you faced the error (IOS or Android or both?) iOS
In Sandbox I created a few consumable items, and I can display them fine. I am able to purchase them as well and calling finishTransaction also.
But when I retrieve the history, I do not get those purchases back.
I should be able to get those consumable purchases back so I can show the user how much have they used in lifetime
real device with sandbox testing account
I think you don't need purchase history of 'consumable products'. It's consumable, so you validate the receipt at the time of purchase, and apply them to user property, it's done.
Restore product is for 'non-consumable'.
I don't know exactly whether the history should have that list, but theoretically this is not an issue for consumable products.
Hi, thanks for your response. Quick question, Shall I make a call to validate the receipt directly from the react native code (which will infact be called from the user device, right?).
Also could you please elaborate the user property that you mentioned?
Thanks
It's possible, but I suggest to validate via Apple server.
https://developer.apple.com/library/archive/releasenotes/General/ValidateAppStoreReceipt/Introduction.html
The user property is the datum which is saved in your server. So, user can consume it in other device, re-install the App and not lose the props. It's like coin, gold in game. I hope you got the idea.
Thank you.
Where in code do we specify if we are validating against SANDBOX or PROD?
Thanks
Girish
@girish-jaju Please refer to validateReceiptIos in the readme. We provided both test and prod environment.
Most helpful comment
It's possible, but I suggest to validate via Apple server.
https://developer.apple.com/library/archive/releasenotes/General/ValidateAppStoreReceipt/Introduction.html
The user property is the datum which is saved in your server. So, user can consume it in other device, re-install the App and not lose the props. It's like coin, gold in game. I hope you got the idea.
Thank you.