Reputation: 373
On the Mac version of my app I used to validate App Store receipts like so:
if (![[NSFileManager defaultManager] fileExistsAtPath:[[[NSBundle mainBundle] appStoreReceiptURL] path]]) {
exit(173);
}
While I did the same on iOS before, it seems that in iOS case this is not the right approach. The app is totally free, and has no IAP. So, is receipt validation even needed? And if yes, what is the right way of doing it for free apps?
Upvotes: 0
Views: 821
Reputation: 318794
There's only one reason to do any receipt validation - piracy. Plenty of apps don't do any validation I'm sure. There's really no reason to care about piracy with a free app. You are not losing any money (unless it has ads and the pirated version removes the ads). So unless the free app has ads and you don't want to lose any ad revenue, there is no reason to do receipt validation on a free app.
Even with a paid app, or an app with in-app purchases, or apps (free or not) with ads, you still don't have to do receipt validation. It's up to you. If you don't care about your app being pirated and the potential loss of sales or ad hits, don't validate the receipt. If you do care, then validate.
Upvotes: 2
Reputation: 4676
If the app is free and you don't use IAP there's no need to check the receipt. It's only purpose is to validate in-app purchases.
Upvotes: 0