0

I have get my In app purchase code set up and i can perform purchase successfully. And when i try to retrieve receipt data with this

NSData *dataReceipt = [NSData dataWithContentsOfURL:[[NSBundle mainBundle] appStoreReceiptURL]];
NSString *receipt = [dataReceipt base64EncodedStringWithOptions:0];

I get response with nil when calling appStoreReceiptURL, does anyone know what is the possible root cause? i'm running out of my mind trouble shooting this.

wes. i
  • 627
  • 9
  • 26

1 Answers1

0

if the path is nil this app wasnt purchased from appstore:

"For an application purchased from the App Store, use this application bundle property to locate the receipt."

Daij-Djan
  • 49,552
  • 17
  • 113
  • 135