i am implementing the in app purchased in my app, i have created the test user, the App ID, Distribution Profile, Development Profile, and also enable the in App Purchased in the App, But does not upload the binaries. I have correctly used the App ID. but when i test the app on the simulator using the Store kit, it gives the following error “Transaction error: An unknown error has occurred, the transaction has been canceled by the user, but the user does not Canceled the Transaction.
- (void)paymentQueue:(SKPaymentQueue *)queue updatedTransactions:(NSArray *)transactions
{
for (SKPaymentTransaction *transaction in transactions)
{
switch (transaction.transactionState)
{
case SKPaymentTransactionStatePurchased:
[self completeTransaction:transaction];
break;
case SKPaymentTransactionStateFailed:
[self failedTransaction:transaction];
break;
case SKPaymentTransactionStateRestored:
[self restoreTransaction:transaction];
default:
break;
}
}
}
Transaction fails and called the method [self failedTransaction:transaction];
If your device is jailbroken then StoreKit will not work on it. Try testing InAppPurchase on a device which is not jailbroken