2

Assuming that I have an app with no in-app purchases, I just need to verify that an app has actually been downloaded from the App Store.

All the information I find when searching for this is about in-app purchase receipt validation. In order to check if it's an App Store download, is it enough to just check if the App Store receipt exists and is valid? Is there any way to test this in a sandbox?

Edit

To test in sandbox, I do this:

NSURL *rURL = [[NSBundle mainBundle] appStoreReceiptURL];
NSError *err;
if (![rURL checkResourceIsReachableAndReturnError:&err]) {

    NSLog(@"Found no receipt");
}

and I always get "Found no receipt".

I also did this:

SKReceiptRefreshRequest *request = [[SKReceiptRefreshRequest alloc] initWithReceiptProperties:nil];
    request.delegate = self;
    [request start];

still can't find any receipt.

DARKMATTER
  • 361
  • 5
  • 14
  • The sandbox provides a dummy receipt that you can validate. – rmaddy Jan 11 '15 at 04:12
  • And the process of validation for an app or an IAP is described here https://developer.apple.com/library/ios/releasenotes/General/ValidateAppStoreReceipt/Chapters/ValidateLocally.html#//apple_ref/doc/uid/TP40010573-CH1-SW2 – Abizern Jan 11 '15 at 04:14

0 Answers0