Apple In receiving an app purchase in the wrong format

I am checking my receipts against Appstore following Apple's guide. The receipt is retrieved from the package using the following code:

NSURL *receiptURL = [[NSBundle mainBundle] appStoreReceiptURL];
NSData *receipt = [NSData dataWithContentsOfURL:receiptURL];
NSString *base64Receipt = [receipt base64EncodedStringWithOptions:0];

      

The encoded receipt is a signed binary as described in the documentation. However, in some strange cases, the get is not the expected binary, but an NSDictionary with the form

{
 pod = 50;
 "purchase-info" = "ewo...";
 signature = "Apdx...";
 "signing-status" = 0;
}

      

When I try to check these receipts against the AppStore, the result is always 21002 ("Data in the receive data property was malformed or missing"). Any ideas on why the receive received from the package is in the wrong format?

+3


source to share





All Articles