I have a mobile app, which for iOS
I am testing with TestFlight.
After I make a successful "Non-Renewing Subscription" purchase, I would expect to see the purchase history when I call Restore Purchases
. When I make a purchase through the TestFlight app, I do not see any historic purchases.
Question
Is this normal behaviour because this is a test environment, and the purchases don't really exist? Or, should I expect to see the historic purchases?
If one cannot see the historic purchases, how do you test Restore Purchases
?
Code:
this.iap.restorePurchases().then((purchases: any[]) => {
// purchases are empty
});
The get Products does return the products successfully.
this.iap.getProducts(this.PRODUCT_IDS).then((products: any[]) => {
...
});
ps. When I run this same code in Android
restorePurchases
does return the historic purchases.
If you refer to table 1-2 and the accompanying text in the In App Purchase Programming Guide you will see that non-renewable subscriptions are not restored by the system; it is your app's responsibility to track the user's subscription status on your own server.
Accordingly you will not see a non-renewing subscription in the restored purchases, so what you are seeing is expected both in test and production.
Auto renewing subscriptions are restorable since Apple's server is tracking the active subscription for you.