我正在尝试在我的应用程序中添加应用程序购买,所以当我在MKStoreKit上思考之后,所有的东西都设置好了,这个项目看起来还好,应该在服务器上的文件,实际上是在服务器上,所有类似的东西。
当我在设备上运行应用程序并按下测试按钮"Buy“时,就会出现混乱。首先,这是,我得到的结果。
2012-02-09 17:45:28.324 MyApp[7147:707] checking if com.my.company.testinapp.pack001 pack is purchased
2012-02-09 17:45:30.814 MyApp[7147:707] Review request cannot be checked now: (null)
2012-02-09 17:45:33.335 MyApp[7147:707] NSUbiquitousKeyValueStore error: com.my.company.inapp has no valid com.apple.developer.ubiquity-kvstore-identifier entitlement
2012-02-09 17:45:33.370 MyApp[7147:707] Problem in iTunes connect configuration for product: com.my.company.testinapp.pack001
2012-02-09 17:45:34.063 MyApp[7147:707] User cancelled transaction: <SKPaymentTransaction: 0x8c0fde0>
2012-02-09 17:45:34.064 MyApp[7147:707] error: Error Domain=SKErrorDomain Code=3 "Cannot connect to iTunes Store" UserInfo=0x8c1f210 {NSLocalizedDescription=Cannot connect to iTunes Store}
2012-02-09 17:45:34.065 MyApp[7147:707] User Cancelled Transaction
2012-02-09 17:45:58:174 MyApp[7147:20747] finished networking setup让我们向后退一步,看一看童子军:
这是我的调用代码
- (IBAction)iap:(id)sender {
NSLog(@"checking if %@ pack is purchased", kFeatureAId);
if([MKStoreManager isFeaturePurchased:kFeatureAId]) { //unlock it
NSLog(@"horray, you already purchased this item!");
} else {
[[MKStoreManager sharedManager] buyFeature:kFeatureAId
onComplete:^(NSString* purchasedFeature) {
NSLog(@"Purchased: %@", purchasedFeature);
} onCancelled:^ {
NSLog(@"User Cancelled Transaction");
}];
}
}因此,基本上,我只是在调用一个测试项的购买。
这是MKStoreConfig.h
#define kConsumableBaseFeatureId @"com.my.company.inapp" /* this is the bundle id */
#define kFeatureAId @"com.my.company.testinapp.pack001" /* this is the product id */
#define kConsumableFeatureBId @"com.my.company.testinapp.pack001.582046155" /* this is the product id + product number */
#define FishBasket @"FishBasket"
#define SERVER_PRODUCT_MODEL 4
#define OWN_SERVER @"http://testings.company.my.com/inappscripts"
#define REVIEW_ALLOWED 1
#warning Shared Secret Missing Ignore this warning if you don't use auto-renewable subscriptions
#define kSharedSecret @"d43ecfa9d8b94facfbcfed1eca509dbe"这些信息足以对我的案例进行分析,如果你需要更多的细节,只要问一问,我很乐意回答。
希望有人能帮我解决这个问题。))预先谢谢!
-k-
发布于 2012-02-10 14:38:41
当您收到“产品的iTunes连接配置中的问题: com.my.company.testinapp.pack001”的消息时,这意味着您的产品在iTunes连接上没有正确配置。
它已经“允许出售”了吗?
你是否上传了一张截图,并将状态标记为“开发者批准”?
如果这是你的第一个应用程序,你向苹果提交了银行和税务报表吗?-奇怪的是,如果你不能“合法”销售产品,IAP就会失败。您的“合同、税收和银行业务”信息应显示这三个部分的绿色标记。
希望这能有所帮助。
- Mugunth (我写了MKStoreKit)
https://stackoverflow.com/questions/9215288
复制相似问题