Reputation: 227
Apple has rejected my application with following reason: "app initiates the In App Purchase process in a non-standard manner.
Instead of displaying the item description first and asking for a login after the user taps OK, the app asks for the login first, which is the incorrect order. "
I have checked my code, but it's the same as in my other application, where in-app purchase works fine. Then I've changed bundle ID and productID (set the bundle ID from my other app) and it worked fine!
It's very odd, I think. Anybody had this problem? Can you help me?
UPD:
In the debugger I see this error:
"Unexpected exception during finish transaction: Cannot finish a purchasing transaction"
It happens at this moment in code:
@try
{
[[SKPaymentQueue defaultQueue] finishTransaction: transaction];
}
@catch (NSException *exception)
{
NSLog(@"Unexpected exception during finish transaction: %@", exception);
}
Upvotes: 1
Views: 1279
Reputation: 227
Yep, I resolved this problem. It is very strange, but re-creating my game in itunesconnect.apple.com helps me.
Upvotes: 0
Reputation: 6028
Your error message would seem to state that you're trying to finish a transaction whose state is SKPaymentTransactionStatePurchasing
.
You should check the state of the transaction via [transaction transactionState]
first to ensure the transaction is either:
SKPaymentTransactionStateFailed
SKPaymentTransactionStatePurchased
SKPaymentTransactionStateRestored
See the Apple Documentation for further clarification:
Your application should call this method from a transaction observer that received a notification from the payment queue. Calling finishTransaction: on a transaction removes it from the queue. Your application should call finishTransaction: only after it has successfully processed the transaction and unlocked the functionality purchased by the user.
Calling finishTransaction: on a transaction that is in the SKPaymentTransactionStatePurchasing state throws an exception.
Upvotes: 7