In app subscription receipt

I am stuck in receipt verification. Here's the scenario :

  • If I am logged in with User A's apple id on the device.
  • User A purchases a subscription in my app.
  • User A signs out from the app.
  • User B sign-in into the app.
  • User B changes device's apple Id login to his own apple id.
  • Now if I fetch the receipt from bundle then will it be of User A's apple id transaction receipt or User B's apple id transaction receipt.

My response is based on the assumption that the app is using StoreKit 1 API's. The appStoreReceipt will be for whatever user action most recently caused the appStoreReceipt to be updated. In this case, when User A made the subscription purchase, the successful transaction will result in the appStoreReceipt to be updated to reflect the successful transaction by User A. When User B logs into the app no action taken by the StoreKit to update the appStoreReceipt. When User B changes the device's App Store ID to match User B's ID, here again, no action is taken by StoreKit to updated the appStoreReceipt. If the appStoreReceipt is validated, it will provide the transaction information about User A.

The appStoreReceipt is updated whenever the following occurs. There is a successful purchase transaction. The restoreCompletedTransactions successfully restores finished transactions. The SKReceiptRefreshRequest is used to refresh the receipt. With StoreKit 1, the app is responsible for managing transactions for a multi-user application.

With StoreKit 2, when a purchase attempt is made, the app can associate a application specific identifier with the purchase - for example an identifier associated with the current user. Later, after the transaction is successful, access to information about the transaction will include the app specific identifier. Keep in mind StoreKit 2 requires the presence of iOS 15.

rich kubota developer technical support CoreOS/Hardware/MFI

In app subscription receipt
 
 
Q