In-APP purchase
(Nonconsumable) If you buy it, you will have the title and function (Consumable). If you buy it, you will use it. If you use it, you will not have it.
Product defined
Products defined
# Define kIAPBomb @ "airplay.10bombs"
# Define kIAPBullet @ "airplay. laserBullet"
1. when instantiating a request, you must specify a valid identifiers set. The reason for this is to ensure that the submitted inner-purchased items have been approved by Apple and are available!
2. To obtain an accurate set of available products, you must use the proxy method.
3. the jailbreak user cannot test the in-house purchase, but can purchase
ITViewController () <SKProductsRequestDelegate, SKPaymentTransactionObserver> NSMutableDictionary * }
- ( }
Mark asks Apple's server which products can be sold-(NSSet * = SKProductsRequest * request = [[SKProductsRequest alloc] initWithProductIdentifiers: =
- ()productsRequest:(SKProductsRequest *)request didReceiveResponse:(SKProductsResponse * (_productDict === (SKProduct *product NSLog(==
Mark-the user decides to purchase the product-() buyProduct :( SKProduct * SKPayment * payment =}
- - (IBAction)purchaseBomb:( }
Mark-SKPaymentTransaction Observer mark changes in the purchase queue status-() paymentQueue :( SKPaymentQueue *) queue updatedTransactions :( NSArray * (SKPaymentTransaction * transaction (SKPaymentTransactionStatePurchased = (Signature =
Mark-Restore product -(
Mark to verify the purchase Credential-(NSURL * receiptURL = NSData * receiptData = NSURL * url = NSMutableURLRequest * request = [NSMutableURLRequest requestWithURL: url cachePolicy: Invalid timeoutInterval: request. HTTPMethod = NSString * encodeStr = NSString * payload = [NSString stringWithFormat: receept-data \ NSData * payloadData = request. HTTPBody = NSData * result = (result = NSLog (NSDictionary * d Ict = NSLog (dict! = NSLog (}
------
----------
--
Clear Saup