8

在生产环境中,如果用户进行应用内购买,然后更新到较新版本的应用,那么反映应用内购买的收据是否仍然存在于捆绑包中?或者它会被应用程序更新消灭吗?

4

1 回答 1

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

于 2017-08-01T21:48:54.180 回答