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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With