I am using this code for in-app purchases, took it from RaywernderLich\'s tutorial.
// Encode the receiptData for the itms receipt verification POST requ
NSURL *receiptURL = [[NSBundle mainBundle] appStoreReceiptURL]; NSData *receipt = [NSData dataWithContentsOfURL:receiptURL]; if(!receipt) { /* No local receipt -- handle the error. */ } NSString *jsonObjectString = [receipt base64EncodedString];