Open tannakartikey opened 1 year ago
@tannakartikey You're totally right. Last week I was actually also hit by this warning.
According to your linked answer from Apple support, the API will continue to work until further notice:
[...] It will continue to function until an end of life date is announced.
The end of life date is currently yet to be determined and developer will get a notification in advance prior to end of life.
I would like to discuss the options we have. As far as I understood with the new process, there are two ways the verification can happen, according to Apple:
Refs: https://developer.apple.com/documentation/appstorereceipts/validating_receipts_on_the_device
The question is, which of these ways is more appropriate for candy_check.
My currently feelings are:
Thanks for the write-up @jnbt
The project I am working on, and probably for all those using this gem, it will be easier to adapt to Option A. I am going to look into it how to implement it. Do you have any suggestions on the starting point?
We can think about implementing both options too.
Check this code from Apple for option A: https://github.com/apple/app-store-server-library-node/blob/main/receipt_utility.ts#L17
It's from their official NodeJS package, but it comes with a warning:
* Extracts a transaction id from an encoded App Receipt. Throws if the receipt does not match the expected format.
* *NO validation* is performed on the receipt, and any data returned should only be used to call the App Store Server API.
My current approach is taking the transaction_id coming from the App for an Apple Device, getting data from Apple API for the transactions with gettrans end point. You can get the 'original_trans_id' which can be stored and used to reference back to the sub on other end points like get sub status endpoint, which will return if the sub is alive,revoked,expired etc much like their webhooks.
We use the
/verifyReceipt
endpoint which is deprecated by Apple.The deprecated warning:
A question on the forum answered by Apple support: When will the verifyReceipt api be deprecated?
Just wanted to start a discussion and help in any way with the next steps.