Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

My app is getting a very high percentage of in app purchases failing due to "Cannot connect to iTunes Store" in the released version of the app

I added in app purchase to my app and everything works great when I tested it in the sandbox. The app is currently in production and users are successfully making in app purchases as I can see the data in the sales report in iTunes Connect. In my app I track when a user starts the process to do an in app purchase and then if it was successful or not. 72% of the time that a user starts an in app purchases it fails with the error "Cannot connect to iTunes Store". My app has enough users making purchases that this is in not due to a small sample set, (i.e. 3 of the 4 users who did an IAP failed). While I have a decent amount of user's successfully making purchases, 72% seems very high to fail with "Cannot connect to iTunes Store".

Does anyone know what can cause this error in production? Is there something I am doing wrong in my app or can I give a better error message to users so that they know what is going on? When I searched stack overflow for this question I found a lot of posts about this error in the sandbox or happening on EVERY purchase, but I did not find any posts about when this happens sometimes in production.

like image 494
Stephen Johnson Avatar asked Nov 10 '22 13:11

Stephen Johnson


1 Answers

This error occurs when the user initiates and then cancels a purchase.

Because the text in the NSLocalizedDescription of the NSError is not very helpful, I show my own error message instead.

like image 153
Onato Avatar answered Nov 15 '22 11:11

Onato