In app purchase Receipt data to base64 becoming null in iOS 9 beta?

Below is my code to get base 64 string from receipt data, but some how its coming up as null in iOS 9 beta.


NSURL *receiptURL = [[NSBundle mainBundle] appStoreReceiptURL];

NSData *receipt = [NSData dataWithContentsOfURL:receiptURL];

if (!receipt) { / No local receipt -- handle the error. */

NSLog(@"receipt is nil");

} else {

NSString *base64String = [receipt base64EncodedStringWithOptions:0];

NSLog(@"receipt base 64:%@",base64String);


}


And here is the log:

receipt base 64:(null)


I am getting other transaction data fine, just receipt is getting as null

It certainly is weird that the code is executing the NSLog command and displaying a null value for the receipt.

I note that what you wrote has an error in it -

" if (!receipt) { / No local receipt -- handle the error. */ "


this line is missing a " * " after the first " / " - is there more missing that might explain the error?

please consider it as typo..

In app purchase Receipt data to base64 becoming null in iOS 9 beta?
 
 
Q