I used auto-renewable
subscription
in my app. All things working perfectly but if user delete app from iPhone
and again install then how to know that user is already subscribed or not?
we have to store user data or server or not?
I refer some questions like it , they says Apple
reject that app which use restore button with auto-renewable
In-App-Purchase
.
They reject apps that does NOT have the restore button. Every app that provides non_consumable or auto_renewable_subscription purchases MUST have it. They also provide everything you need in order to actually restore user purchases at SKPaymentQueue without having to store it somewhere else.
SKPaymentQueue.default().restoreCompletedTransactions()
Which will trigger the method:
func paymentQueue(_ queue: SKPaymentQueue, updatedTransactions transactions: [SKPaymentTransaction])
from
SKPaymentTransactionObserver
I recommend this guide, everything there works very well: https://hackernoon.com/swift-how-to-add-in-app-purchases-in-your-ios-app-c1dc2fc82319
Also don't forget to add your Items ID before asking for purchases history.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With