我还在为 MKStoreKit 苦苦挣扎。
有一个名为“buyAction”的按钮必须启动应用内购买流程。我尝试按照教程建议实施它,但它仍然不起作用:
- (IBAction)buyAction:(id)sender {
NSLog(@"buyFeature")
[[MKStoreManager sharedManager] buyFeature:@"PBonnet.TOEIC3.Package1"
onComplete:^(NSString* purchasedFeature, NSData*purchasedReceipt, NSArray* availableDownloads)
{ package1bought=1;
NSLog(@"success");
}
onCancelled:^
{ NSLog(@"failed purchase");
}];
}
在线上onComplete
,我收到 2 条错误消息:“参数名称省略”和“预期表达式”。
谢谢你的帮助。
干杯
按照马特的假设编辑该onComplete
行。现在,日志显示“buyFeature”,但之后什么也没有。App Store 未启动。日志显示此错误消息:
NSUbiquitousKeyValueStore error: PBonnet.TOEIC3 has no valid com.apple.developer.ubiquity-kvstore-identifier entitlement
.