Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is the receipt at [NSBundle appStoreReceiptURL] still present after an app update

In the production environment if a user makes an in app purchase and then updates to a newer version of an app is the receipt that reflects the in app purchase still present in the bundle? or does it get wiped out by the app update?

like image 635
techsMex Avatar asked Sep 18 '14 05:09

techsMex


1 Answers

Ok so I think I finally found an answer to this question.

A receipt is meant to be a trusted record of a purchase, along with any in-app purchases that the user has made — much like a paper receipt that you get when shopping in a store. Here are some key points about receipts:

  • A receipt is created and signed by Apple through the App Store.

  • A receipt is issued for a specific version of an application and a specific device.

  • A receipt is stored locally on the device.

  • A receipt is issued each time an installation or an update occurs.

  • When an application is installed, a receipt that matches the application and the device is issued.

  • When an application is updated, a receipt that matches the new version of the application is issued.

  • A receipt is issued each time a transaction occurs:

  • When an in-app purchase occurs, a receipt is issued so that it can be accessed to verify that purchase.

  • When previous transactions are restored, a receipt is issued so that it can be accessed to verify those purchases.

Sourced from https://www.objc.io/issues/17-security/receipt-validation/

So if you update an app that has purchase history on the receipt, this purchase history should be included on the new receipt that gets issued for the new app version. (Unless of course it was a consumable).

like image 63
Rhys Lewis Avatar answered Oct 16 '22 22:10

Rhys Lewis