Question: The [Apple docs](https://developer.apple.com/library/content/releasenotes/General/ValidateAppStoreReceipt/Chapters/ValidateLocally.html) on receipt validation say to perform receipt validation immediately after launch. This amounts to checking for data at the path returned by `[[NSBundle mainBundle] appStoreRecieptURL]`, refreshing via `SKReceiptRefreshRequest` if it's not there, and validating it. The aforelinked docs reference both iOS and macOS.

Is it actually *necessary* on iOS? If so, why? Is it to prevent users from using my app on a jailbroken device, or without having bought it from the app store (in which case I probably don't care if my app is free)? Or does it have implications for other operations like restoring or validating in-app purchases? For example, does the receipt data have to be there already in order to validate a transaction for an in-app purchase?

Note: I am not using in-app subscriptions. I have in-app purchases, but I don't use the receipts from them after verifying them and recording the purchase server-side.

Answer: 
You would generally only validate the receipt to prevent piracy by users who haven't bought your app or if you are using auto renewing subscriptions.

Whilst you can interrogate the receipt for IAP information, its actually easier (and required by app review) to give a button somewhere to "restore previous purchases" and call 

```
[[SKPaymentQueue defaultQueue] restoreCompletedTransactions];

```

It is also a better UX for the user to possibly be prompted for their Apple ID and password having pressed a "restore purchases" button rather than unexplained at app startup.
It's not necessary, but beneficial for the following reasons:

1. You'll always get the definite set of purchased products and not require the user to manually restore the products.
2. You have (limited) fraud protection, especially if you combine local and remote validation.
3. It's way more simple to compute the expiration date for automatically renewing subscriptions using the recipe.