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