roddi / ValidateStoreReceipt

validate the receipt a well-known computer company's application store sends
355 stars 37 forks source link

Helpful code if you are trying to validate a real receipt #6

Closed ghost closed 13 years ago

ghost commented 13 years ago

In order to validate against the real receipt after testing, change this line of code:

if (!validateReceiptAtPath(@"~/Desktop/receipt"))

to

NSString *pathToReceipt = [[[NSBundle mainBundle] bundlePath] stringByAppendingPathComponent:@"Contents/_MASReceipt/receipt"];

if (!validateReceiptAtPath(pathToReceipt))

exit(173);//receipt did not validate

courtesy http://jesusagora.org/groups/futurebasic/0::53562:get:1read.html

roddi commented 13 years ago

Correct. Won't fix, as everyone has to do that in their own code