Any example on how to implement the new VerificationController and the KNOWN_TRANSACTIONS_KEY constant?
in-app-purchase, ios, iphone, objective-c
Solution
In the file "VerificationController.m", check this function:
- (void)saveTransactionId:(NSString *)transactionId
we can see, KNOWN_TRANSACTIONS_KEY is a key to be wrote to NSUserDefaults. So we don't need to touch it.
login iTunes Connect > Manage Your Apps > (click your app) > Manage In-App Purchases > click the link View or generate a shared secret (at bottom-left of the page) it'll show us:
A shared secret is a unique code that you should use when you make the call to our servers for your In-App Purchase receipts.
Just click Generate.
Problem
I've been looking at implementing the new VerificationController to verify in-App-Purchases: http://developer.apple.com/library/ios/#releasenotes/StoreKit/IAP_ReceiptValidation/_index.html And I wonder if there is some example anywhere en how to validate a transaction, since it seems that the `- (BOOL)verifyPurchase:(SKPaymentTransaction *)transaction;` is not enough and it has to be implemented internally to verify the purchase when the data form the server is received. Another question is if anyone has a clue on what the KNOWN_TRANSACTIONS_KEY is and how to fill it, is it just the product id of the purchase?