3

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.

Mobile Ben
  • 7,121
  • 1
  • 27
  • 43
  • I find the sandbox quite an unreliable way to test. The whole process of in app purchase is pretty indeterminate. – matt Mar 14 '19 at 01:14
  • @matt sigh, agreed. I've worked on a bunch of IAP in iOS. I just don't recall anything like this happening. I think I would have remembered QA being in an uproar over something like. – Mobile Ben Mar 14 '19 at 01:24
  • 2
    Hmmm see https://stackoverflow.com/questions/55158357/swift-inapp-purchase-fails-but-system-dialog-say-youre-all-set I think the whole store purchase mechanism has broken down suddenly. – matt Mar 14 '19 at 12:48
  • Possibly related to https://stackoverflow.com/questions/55132628/provisioning-profile-doesnt-include-the-application-identifier-and-keychain-acc/55152736#55152736 – matt Mar 14 '19 at 12:51
  • 1
    This seems to be a widespread issue in Sandbox right now: https://twitter.com/RevenueCat/status/1106235357413036032 – enc_life Mar 14 '19 at 16:48
  • @matt thanks for the follow up! I also did open a bug report with Apple. Mainly because it seems odd that 2 parts of their system think the results are different. – Mobile Ben Mar 14 '19 at 21:29

0 Answers0