0

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?

DARKMATTER
  • 361
  • 5
  • 14
  • What's the point of validating the receipt of a free app with no in-app purchases? Do you care if the copy of the app is pirated? – rmaddy Sep 30 '14 at 23:42
  • 1
    Well, yes, that was actually my point: is there any reason for a free app to validate the receipt? You mentioned piracy, which may be a good reason. I need to know if receipt validation is a common practice for free apps (in order to avoid piracy for example). – DARKMATTER Sep 30 '14 at 23:48

2 Answers2

2

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.

rmaddy
  • 314,917
  • 42
  • 532
  • 579
  • Can the previous installation of a free app be validated (or confirmed), though? Or does receipt validation only apply to paid apps or in app purchases? – nontomatic Apr 30 '18 at 22:25
0

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.

fluidsonic
  • 4,655
  • 2
  • 24
  • 34
  • 3
    Actually, receipt validation can also used to validate the purchase of a paid app, in addition to any in-app purchases. Of course this is pointless with a free app with no in-app purchases. – rmaddy Sep 30 '14 at 23:40