While testing In-App-Purchase in the SANDBOX ENVIRONMENT on the device, I\'m logging the following error :
Error Domain=SKErrorDomain Code=0 \"Cannot connect
It also happens if you are logged in with some other iTunes Account. To test the In App purchase in Sandbox box you need to log out from any other account from Setting. Then launch your application and Do in App Purchase. When your account is asked enter the one you created as iTunes Test Account. This way your Sandbox environment would work perfectly. Hope this would be helpful.