How to test In App Purchases through Apple TestFlight?

TestFlight users don’t require a sandbox account, but they will test against an automatically created sandbox account. Sandbox Accounts The moment a tester opens your application, a sandbox account is created for them. This means it’s no longer necessary to create test accounts in iTunes Connect. Testing In-App Purchases was never easier. Source Note that … Read more

In app purchases restore Button

I use a variation of this: //inside of an IBaction [[SKPaymentQueue defaultQueue] addTransactionObserver:self]; [[SKPaymentQueue defaultQueue]restoreCompletedTransactions]; // Then this is called – (void)paymentQueueRestoreCompletedTransactionsFinished:(SKPaymentQueue *)queue { NSLog(@”%@”,queue ); NSLog(@”Restored Transactions are once again in Queue for purchasing %@”,[queue transactions]); NSMutableArray *purchasedItemIDs = [[NSMutableArray alloc] init]; NSLog(@”received restored transactions: %i”, queue.transactions.count); for (SKPaymentTransaction *transaction in queue.transactions) { NSString … Read more

iPhone In App Purchase – response.products are still empty?

Another important step that is often overlooked is you need to make sure you have an iOS Paid Applications Contract setup which is located under the “Contracts, Tax, and Banking” section of iTunes connect. First you have to click on the request button, then you have to click on the 3 Set Up buttons (Contact … Read more

In App Purchase Crashes on [[SKPaymentQueue defaultQueue] addPayment:payment]

The error message indicates a message is being sent to a deallocated instance of InAppPurchaseManager, which is your class. And it’s happening after you open the view (creating an instance), close the view (releasing an instance), then opening the view again (creating a second instance). And the problem is happening within the addPayment: call. This … Read more

iPhone In-App Purchase Store Kit error -1003 “Cannot connect to iTunes Store”

I had a similar situation and dumped the iPhone’s network traffic to see what’s going on. I found that the normal store was contacted instead of the sandbox. It helped to delete the app from the device, make clean and build/install it again. Apparently something with the development profile had gone wrong. Update: To dump … Read more

In-app billing (v3) – IllegalArgumentException: Service not registered:

I believe this is a bug in In IabHelper dispose method, the following line, if (mContext != null) mContext.unbindService(mServiceConn); should be changed to this. if (mContext != null && mService != null) mContext.unbindService(mServiceConn); mService is only set once the Service has been registered, so checking it for != null will guarantee that service is … Read more