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

1

8

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?

Moss answered 18/9, 2014 at 5:44 Comment(6)
Why does it matter? Supposedly the receipt might be deleted under certain circumstances so your app needs to download a new copy if there isn't one. What issue do you have?Marathi
No specific issue, I was interested to know if it is generally persisted or if I have to request a new one alwaysMoss
You should always request a new one if there isn't one. It doesn't matter why or when it went missing. How you deal with being unable to get a new receipt is a whole other question.Marathi
Requesting a new receipt prompts user to enter their iTunes password. I don't want this prompt popping up unexpectedly (from the user's perspective). Therefore I am trying to better understand when the receipt can be deleted since apple documentation, as usual, is vague in this area.Moss
Did you find the answer to this question by trial? I am wondering the same thing.Enrichment
Did anyone ever figure this out?Justinjustina
J
1

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).

Justinjustina answered 1/8, 2017 at 21:48 Comment(1)
When restoring purchases, if I access the local app receipt that is not updated. This happened in production. Can you demonstrate the inverse?Welborn

© 2022 - 2024 — McMap. All rights reserved.