First of all, the complete code I do not provide here, here is a download link
http://code.cocoachina.com/view/130335
There is a code, you can not pass debugging, the reasons are mainly three aspects
- The first problem is the inability to get a list of products defined within the Itune Connect inside, mainly for several reasons
1, check whether your provisioning profile contains support In-app purchase. If not, regenerate
2. No build number added
3, whether to use the real machine debugging this is very important, this is also a lot of people ignore the problem, note that the shutdown simulator when debugging, it is said that in a certain version of Xcode is a bug.
- Second Error domain=skerrordomain code=0 "Cannot connect to ITunes Store
1, have you added test account in Itune connect inside, add test account inside
2, there is no use of the United States, the first of their real machine on the App Store switch to the United States, remember to create the use of the account will also use the U.S. region account
3. Error Domain=skerrordomain code=2 "Cannot connect to ITunes Store
This is because localization error, remember English localization must use the corresponding language
Finally, all right, all right, good luck.
In-app purchase developed 3 pit Error Domain=skerrordomain code=0 "Cannot connect to ITunes Store