Restore button is required when auto-renewable subscription used 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.


you should keep a restore button.

The receipt will tell you that subscribed or not and u can validate this with your server. For info

https://developer.apple.com/library/content/releasenotes/General/ValidateAppStoreReceipt/Chapters/ValidateRemotely.html

There you have to check latest_receipt_info key, that will be array of json then u read last object and check expires_date key.

https://developer.apple.com/library/content/releasenotes/General/ValidateAppStoreReceipt/Chapters/ReceiptFields.html#//apple_ref/doc/uid/TP40010573-CH106-SW2