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 replies on ““Cannot connect to iTunes Store””
No … I get it on real device …
Well, store kit — as with a few other iOS frameworksAVFoundation — 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.