0

我正在尝试在 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 和产品名称替换)。

任何帮助,将不胜感激。

4

1 回答 1

0

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.

于 2010-06-18T20:24:28.777 回答