Any example of how to implement the new VerificationController and the constant KNOWN_TRANSACTIONS_KEY?

I was looking at introducing a new VerificationController for checking in-app purchases: http://developer.apple.com/library/ios/#releasenotes/StoreKit/IAP_ReceiptValidation/_index.html

And I wonder if there is any example where you can verify the transaction, since it seems that it is - (BOOL)verifyPurchase:(SKPaymentTransaction *)transaction;not enough, and it must be implemented internally to verify the purchase when the data is generated on the server.

Another question: does anyone know what KNOWN_TRANSACTIONS_KEY is and how to fill it out, is this just the product identifier of the purchase?

+5
source share
4 answers

"VerificationController.m" :

- (void)saveTransactionId:(NSString *)transactionId

, KNOWN_TRANSACTIONS_KEY - , NSUserDefaults. .

login iTunes Connect > > ( ) > > ( ) :

- , , .

"".

+5

RayWenderlich.com

, iOS 6: RayWenderlich.com, Apple , ( Base64) .

+3

, :

SKPaymentTransactionStatePurchased 
SKPaymentTransactionStateRestored

:

[[VerificationController sharedInstance] verifyPurchase:transaction];

, . . VerificationController.m, :

#warning Validation succeeded. Unlock content here.

#warning VerificationController.m, .

base64, , , , , :

http://www.imthi.com/blog/programming/iphone-sdk-base64-encode-decode.php

When it comes to

 KNOWN_TRANSACTIONS_KEY 

and

ITC_CONTENT_PROVIDER_SHARED_SECRET

I would also like to know why they are needed, and why and when they are needed.

+1
source

All Articles