“Cannot connect to iTunes Store”

If you’re trying to test a new in-app purchase on iOS, and you get this mysterious error:

Error Domain=SKErrorDomain Code=0 "Cannot connect to iTunes Store" UserInfo={NSLocalizedDescription=Cannot connect to iTunes Store}

… make sure you’re using a real device. This error will be given if you try to complete a purchase in the Simulator. That’s right, although you can list purchases in the simulator, actually buying something with a Test user in the sandbox environment will simply fail with this vague error.

2 thoughts on ““Cannot connect to iTunes Store”

  1. Well, store kit — as with a few other iOS frameworks AVFoundation — doesn’t necessarily have the best error handling. So this isn’t the ONLY reason it can happen, just one of those reasons that someone accustomed to developing in the simulator might not think of.

Leave a Reply

Your email address will not be published. Required fields are marked *