The idea is, rain or shine, wet or fine, the user should get what he paid for everything.
From Apple:
Store Kit provides built-in functionality to restore transactions for non-consumable products, auto-renewable subscriptions and free subscriptions
The Apple Store Kit has good built-in tools for these transactions. I want to focus on other types (in particular, consumed). One and only transaction information is the identifier and receipt information that we receive through the Store Kit after a successful purchase. Our application uses a server model for delivering products to it. But there are still many cases of loss of purchase data, for example, if the server goes down when a user makes a purchase through the App Store, so it is impossible to send a receipt to the server to complete the verification process.
Current workaround:
- The server returns a list of product identifiers
- The user selects one; The application saves its identifier on the device (via SQLite or Core Data). After that, the transaction process of the standard Apple Store goes.
- If successful, the application saves the receipt data along with its identifier on the device and sends it to the server. If a failure or cancellation occurs, the identifier is immediately deleted from the device.
- If the server response is OK, the application deletes the ID with the receipt data from the device. Otherwise, it will periodically send requests to the server until a successful response is reached.
But this approach still has leaks. For example, a user can remove an application from a device without waiting for the transaction to be delivered to the server, so there will be no evidence of its purchase at all.
Your suggestions?
source share