内置付费 inapp purchase and Error Domain=SKErrorDomain Code=0 “Cannot connect to iT
<div id="cnblogs_post_body">MKStoreKit 3.0+ 内置付费的开源库 Mugunth Kumar大神的英文iPhone Tutorial &ndash; In-App Purchases
中文翻译的地址 http://www.overcode.hk/?p=298
MKStoreKit 4.0非常简单 代码几乎几行就能搞定 比3.0用着方便多了
里面详细介绍了 使用方式,源代码下载里面给出了连接,
MKStoreKit4.0 使用简单介绍
源码在https://github.com/MugunthKumar/MKStoreKit
appdelegate.m文件中添加代码
#import "MKStoreManager.h"
在applicationDidFinishLaunching调用 使其initialize。
在购买物品的地方使用函数
#import "MKStoreManager.h"<div class="cnblogs_Highlighter"> NSString* kFeatureId = ; [ buyFeature:kFeatureId onComplete:^(NSString* purchasedFeature, NSData*purchasedReceipt, NSArray* availableDownloads){ //购买成功 添加金钱等物品 NSLog(@"Purchased: %@", purchasedFeature);} onCancelled:^{/*购买取消 做相应操作或者什么都不做*/}];
页:
[1]