I'm doing some testing around IAP on a device. Purchases normally work, however today I'm getting an interesting behavior that I haven't seen before.
When I make the purchase, I receive a
You're all set. Your purchase was successful. [Environment: Sandbox]
alert.
However, I am getting a transaction state of SKPaymentTransactionStateFailed
with the error
Error Domain=SKErrorDomain Code=0 "Cannot connect to iTunes Store" UserInfo={NSLocalizedDescription=Cannot connect to iTunes Store}
On the one hand this was fortuitous in that I discovered I was accidentally calling finishTransaction
. On the other hand, it is bit weird to see the alert which indicates the success but yet receive a different type of error from the transaction.
Do I chalk this up to one of the nuances of the sandbox? Or can something like this happen in prod too?
What is interesting about this is it seems then there are 2 different mechanisms underneath.
I do plan on creating a bug report for this with Apple.