Built-in paid Inapp purchase and error Domain=skerrordomain code=0 "Cannot connect to ITunes Store" error

Source: Internet
Author: User
Tags appsync

Mkstorekit 3.0+ built-in paid open Source Library Mugunth Kumar The Great God's

English iphone Tutorial–in-app purchases

The address of Chinese translation http://www.overcode.hk/?p=298

Mkstorekit 4.0 very simple code can be done in almost a few lines is more convenient than 3.0.

Inside the detailed introduction of the use of the source code to download the connection,

Simple introduction to the use of MKStoreKit4.0

Source code in Https://github.com/MugunthKumar/MKStoreKit

Add code to the APPDELEGATE.M file

#import "MKStoreManager.h"

Call [Mkstoremanager Sharedmanager] in applicationdidfinishlaunching to make it initialize.

Use functions where you buy items

#import "MKStoreManager.h"
    nsstring* Kfeatureid = [NSString stringwithformat:@ "com.yourcompany.gamename.%d", _buyproductid+1];    [[Mkstoremanager Sharedmanager] Buyfeature:kfeatureid                                    oncomplete:^ (nsstring* purchasedfeature,                                                 NSData* Purchasedreceipt,                                                 nsarray* availabledownloads) {                                                    //purchase successfully add money and other Items                                                    NSLog (@ "purchased:%@", purchasedfeature);}                                   oncancelled:^{/* purchase Cancel to do the corresponding operation or do nothing/}];

Buliding found an arc error and then modified it in targets-> buldphases to modify the related file attribute to-fobjc-arc altogether three files

It's so simple. No longer true machine test can be successful, but be sure to do the real machine test.

Error Domain=skerrordomain Code=0 "Cannot connect to ITunes Store" error (Code = 1/code = 2/code =3) errors in real-machine tests It's a good head, and then you check it out. But in the end it was done, "

You can check in the following ways

(note) Cydia installed Appsync caused by the IAP sandbox can not be a problem, prison escape can, install Cydia can also be, but can not install Appsync, installed will cause IAP Sandbox test failure ()

There are a lot of other statements, probably to do the following points

I finally tuned it up for these operations.

1: If the jailbreak is unloaded in the Cydia appsync

2: Remove the application above the device

3: Log out of the store account and set up a new account. The App Store area is the U.S.

4: Reboot the device

5:run in your Uidevice

Then it felt like a sudden fine. Test successful

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.