问题
Possible Duplicate:
iPhone Store Kit “Cannot connect to iTunes Store”
i am implementing in app purchase when i requesting the payment am getting bellow error.
Transaction Error: Error Domain=SKErrorDomain Code=0 "Cannot connect to iTunes Store" UserInfo=0x2dcf40 {NSLocalizedDescription=Cannot connect to iTunes Store}
Here some times the error code will be 1004. so i cant do the transaction.
in some times it displaying a warning like " has failed the purchase process." ,but still the purchase process is working fine..
am i doing something wrong... or any solution for this problem..?
Thanks
回答1:
There are several recommendations in this discussion: http://www.everythingicafe.com/forum/threads/cannot-connect-to-itunes-store.11586/
Thought most I tried were unsuccessful. I had the best luck signing out of my test account and trying again.
iPad/iPhone -> Setting -> Store -> (select account) -> Sign Out
Then try again.
回答2:
In my project i had not set the CFBundleVersion
. After giving it a value in the project settings purchasing worked. Retrieving the list of products also worked with the missing CFBundleVersion.
Apple also states this in their Technote regarding IAP: http://developer.apple.com/library/ios/#technotes/tn2259/_index.html
回答3:
I have two different iTunes Connect accounts, and my problem was I was using the wrong Test User account.
It wasn't obvious that this is what was wrong as you can login just fine with the wrong account. The error message given to the user was related to the item was already purchased but not downloaded. Using the correct account's test user resolved the issue.
来源:https://stackoverflow.com/questions/5482630/iphone-in-app-purchase-cannot-connect-to-itunes-store