iPhone storekit 产品标识符
我试图在 iPhone 3.1.3 上实现 StoreKit 并不断收到 invalidProductIdentifier 错误。
我的问题是以下两种方法使用的productKey是否相同?
SKProductsRequest *request= [[SKProductsRequest alloc] initWithProductIdentifiers: [NSSet setWithObject: @"com.companyName.productName.upgrade"]];
SKPayment *payment = [SKPayment paymentWithProductIdentifier:@"com.companyName.productName.upgrade"];
我的原因是因为我尝试了不同的productIdentifiers,SKProductsRequest总是返回invalidProductIdentifier,但SKPayment为我尝试过的几乎所有productIdentifier返回SKErrorUnknown,但有趣的是为@“com.companyName.productName.upgrade”返回SKErrorPaymentInvalid(带有companyName和产品名称已替换)。
任何帮助将不胜感激。
I am trying to implement the StoreKit on iPhone 3.1.3 and keep getting the invalidProductIdentifier error.
The question I have is the productKey used in following two methods the same?
SKProductsRequest *request= [[SKProductsRequest alloc] initWithProductIdentifiers: [NSSet setWithObject: @"com.companyName.productName.upgrade"]];
SKPayment *payment = [SKPayment paymentWithProductIdentifier:@"com.companyName.productName.upgrade"];
The reason i as is because I have tried different productIdentifiers and SKProductsRequest always comes back with invalidProductIdentifier but SKPayment returns SKErrorUnknown for almost all the productIdentifier I tried but interestingly returns SKErrorPaymentInvalid for the @"com.companyName.productName.upgrade" (with the companyName and productName substituted).
Any help would be appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
让它与我在 iTunes connect 中创建的新应用内购买 ProductIdentifier 一起使用。等了一夜,早上试了一下,果然成功了。但还是不知道为什么之前的productIdentifier不起作用。
Got it working with a new in-app purchase productIdentifier that I created in iTunes connect. Had to wait overnight and tried it in the morning and it worked. But still don't know why the previous productIdentifier did not work.