I\'m using following method to get the receipt data:
// Use this method instead of accessing transaction.transactionReceipt directly!
- (NSData *)appStoreRec
iOS 7 has changed how receipt validation is done. I went through the exact path you're down and got the same results. What I found was that the receipt from [[NSBundle mainBundle] appStoreReceiptURL]
requires a different method for decoding than the previous transaction.transactionReceipt
.
Here is a snippet from Apple's docs:
The outermost portion is a PKCS #7 container, as defined by RFC 2315, with its payload encoded using ASN.1 (Abstract Syntax Notation One), as defined by ITU-T X.690. The payload is composed of a set of receipt attributes. Each receipt attribute contains a type, a version, and a value.
If you're looking for a quick fix, I've seen success here: https://github.com/rmaddy/VerifyStoreReceiptiOS