I tested in-app purchases in the sandbox. It's working right now my app is live and when I click on the purchase button it goes directly to the app purchase, it is not asking for username / password or the current user. In addition, I do not even have to enter the device after
- (zero) requestForProductWithCompletionHandler {if ([SKPaymentQueue canMakePayments]) {SKProductsRequest * _productsRequest = [[SKProductsRequest alloc] initWithProductIdentifiers: [NSSet SetWithObject: kProductIdentifier]]; _productsandest.delegate = self; [_productscent start]; }} - (Zero) Purchase Product: (SKProduct *) Product {SKMutablePayment * Payment = [product with SKMutablePayment payment]; If (! Isdobswerver) {[[SK PaymentQueue default QE] addTransactionObserver: self]; HasAddObserver = Yes; } [[SKPMentQueue default QE] Ad Payments: Payment]; } #pragma Mark - Product Request DELEGATE - (Zero) productsRequest: (SKProductsRequest *) RequestedReceiveResponse: (SKProductsResponse *) Response {if (response.products.count> 0) {SKProduct * _product = [response.products objectAtIndex: 0]; NSLog (@ "get product"); // [[[UIAlertView alloc] initWithTitle: APPNAME Message: @ "Loaded on Products" Representative: cancelButtonTitle zero: @ "OK" otherButtonTitles: zero, zero] show]; [Self purchase product: _product]; } Other {[BTN: Report set enabled: Yes]; [[[UIAlertView alloc] initWithTitle: APPNAME Message: @ "Invalid Product" Representative: cancelButtonTitle zero: @ "OK" otherButtonTitles: zero, zero] show]; }} - (zero) request: (SKRequest *) requested FailWithError: (NSError *) error {NSLog (@ "% @", error); [BTNRport report enabled: Yes]; [[[UIAlertView alloc] initWithTitle: APPNAME Message: @ "unable to load product" Representative: cancelButtonTitle zero: @ "OK" otherButtonTitles: zero, zero] show]; } # Pargama Mark - Transaction Offper - (zero) Payment Qi: (SK PaymentQueue *) Queued Updated Transaction: (NSERRE *) Transactions {for transactions in SKPat transaction transactions} {Switch (Transactions Transaction State) (Buy Case SQPMant Transaction Stats: [Self Show Transaction As Progress: Transaction Deferred: NO]; break; Case SKPaymentTransactionStateDeferred: [Self showTransactionAsInprogress: Suspended transaction: Yes]; break; Case Skpmant Transaction: Static File: [Self-Failed Transaction: Transaction]; break; Case SkPMent Transaction: Buying Static: [Self-Full Transaction: Transactions]; break; Case SCCMant Transaction Status Reinstated: [Self Restored Transactions: Transactions]; break; Default: // debugging // for NSLog (@ "unexpected transaction status% @", @ (transaction.transactionState)); break; }}}
You have tried to add AppDelegate instead of your paid supervisor View the controller? The best practices of the apple are described how to do it / why.
No comments:
Post a Comment