iOS in-app purchases verify receipts for consumabl

2020-07-27 05:05发布

in iOS with in-app purchases, it is necessary to verify receipts with subscriptions. is it necessary to verify receipts for consumables also?

2条回答
对你真心纯属浪费
2楼-- · 2020-07-27 05:54

No you don't need to verify receipts for consumables.

You don't need to verify receipts for subscriptions either. What's important here is that you can restore running subscriptions; but for that you can use purchase ID.

As always make 100% sure you've given the user what was paid for before telling iOS that the purchase was successful!

(There are all kinds of other considerations why you would like to keep purchase related information on a server, but that's not what you ask about.)

查看更多
冷血范
3楼-- · 2020-07-27 05:57

Necessary, no. Recommended, yes.

All purchases; consumables, un-consumables and subscriptions are susceptible to fraudulent attacks. Often though iap crackers or network spoofing. Validating the receipt can mitigate this problem.

You can validate the receipt locally in the app (see Validating Receipts Locally), though it is still susceptible to cracking.

The safest way to prevent fraud is to perform server-side validation by sending the receipt to your server then sending it on to Apple (see Validating Receipts With the App Store).

However, do not validate the receipt with the app store in the app itself. It's really easy to spoof the network request and return a positive (valid) result.

If you notice a large discrepancy between the actual purchases in your reports from Apple and your in-app purchase analytics (assuming you have that), you may want to invest in server-side validation, otherwise, if it's not a problem, don't worry about it.

查看更多
登录 后发表回答