Server side receipt validation for non-consumable products in iOS7 and transactionReceipt deprecation

前端 未结 1 1598
攒了一身酷
攒了一身酷 2021-02-02 15:56

I\'m porting a working application from previous iOS\'s and am having trouble with the new in app purchase receipts.

The way we work now is to take the transactionRecei

相关标签:
1条回答
  • 2021-02-02 16:27

    From what I've been able to gather via Apple's documentation.

    1) There is one receipt for all purchased products. In order to perform server side validation you send the entire receipt to your server, which forwards it to Apple for verification. See this post on the Apple Developer Forums (starting around comment 13) https://devforums.apple.com/thread/193893?tstart=0

    2) Non-consumables will remain in the receipt forever, so yes it will grow and grow. Consumables are removed lazily from the receipt once finished via a call to finishTransaction. See https://devforums.apple.com/message/876265#876265

    3) The iOS6 way of looping through updatedTransactions and sending individual receipts to your server for validation seems at odds with the new iOS7 design. This post on the Apple Developer forums suggests you "Send the whole list of transactions to your server with the receipt. When the receipt is verified, deliver all of the products, and finish all of the transactions." https://devforums.apple.com/message/897870#897870

    4) That really does seem to be the case.

    If you believe the iOS7 documentation is lacking you can raise a bug report with Apple

    0 讨论(0)
提交回复
热议问题