I am developing a Mac app to support Auto-Renewable Subscriptions. I am using LOCAL RECEIPT VALIDATION only (not using server validation). The receipts in the app bundle should be updated after transaction be finished (by calling queue.finishTransaction(transaction) ), but I found it's impossible to validate the receipt (to validate the users), as the receipts will not be updated correctly.
- Restoring does NOT update the receipt
- If keeping the app running "updatedTransactions" will NOT be called. Restart the app (and let more time go by), "updatedTransactions" will be called
- The receipt will NOT be updated when renewal happened
- AND the receipt will NOT be updated if I did a purchase on another Mac (same testing account in sandbox environment)
But:
- Receipt will be updated if to Purchase a new product or to Refresh Receipt
- I did testing using remote validation method, there is no problem to validate via https://sandbox.itunes.apple.com/verifyReceipt
The problem is that if the local receipt date is not be updated correctly after "finishTransaction" called in the queue "updatedTransactions" methods:
- If purchase renewed, the app has no way to validate it. So the user has to refresh the receipt via the user interface and login Apple Id again - this is a very bad user experience.
- If the user cancelled the subscription, the app has no way to know it (know the new expired_date)
- And I have to use refresh receipt to replace restore receipt operation, as restore receipt will NOT update local receipt.
As the Mac app is a tool app, I don't want to use a server to do remote validation. Would you please help to advice me the solution?
Philip
Philip,
If there is a pending transaction to be processed for an app, and the app is launched and calls addTransactionObserver and the transaction is not detected, this is a bug report issue. Whether the app implements local or networked receipt validation is a separate issue. However, either means can be used to demonstrate the current state of the appStoreReceipt.
To be specific - if you know that a renewal of an auto-renewing subscription has occurred, then there must be an incompleteTransaction pending on the App Store for the iTunes user. If you then launch the app on a device with an active network connection and the addTransactionObserver call occurs, then it's a bug report issue if the incompleteTransaction is not detected. The bug in this case can only be fixed by the App Store server engineers.
As to a workaround, the only one I can think of requires server validation. If the appStoreReceipt shows that there is at least one auto-renewing subscription In-App Purchase item in the in_app array, then validating the receipt with the App Store verifyReceipt server will provide up-to-date information about the auto-renewing subscription. There is no workaround solution for the app if local appStoreReceipt validation is used.
rich kubota - rkubota@apple.com
developer technical support CoreOS/Hardware/MFI