gpt4 book ai didi

iOS/swift : InAppPurchase invalidProductIdentifiers

转载 作者:行者123 更新时间:2023-11-28 06:54:50 27 4
gpt4 key购买 nike

我在 iTunes Connect 中创建了一个 IAP 产品。

它的状态是:准备提交

在 Delegate 应用程序上,我使用以下代码来检索产品信息:

func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
...
requestProductData()
return true
}

func requestProductData() {
if SKPaymentQueue.canMakePayments() {
let request = SKProductsRequest(productIdentifiers: Set(["xxxx.xxxxx.xxxx"]))
request.delegate = self
request.start()
}
}

func productsRequest(request: SKProductsRequest, didReceiveResponse response: SKProductsResponse) {
var products = response.products
print("products:",products.count)
for product in response.invalidProductIdentifiers {
print("Product not found: \(product)")
}
}

我总是得到:“找不到产品:xxxx.xxxxx.xxxx”

我确认产品 ID 已正确写入。

我使用的是物理设备,而不是模拟器。

物理设备登录的AppleID已正确添加到测试者沙盒列表中。

到目前为止,我的应用程序只提交给了 TestFlight(没有应用程序内购买),还没有提交给 Appstore。

更新:

我的付费应用契约(Contract)状态显示:processing

这可能是原因吗?

最佳答案

是的,如果没有与 Apple 签订的有效付费应用契约(Contract),则无法进行测试——您需要提供您的联系信息、银行信息和税务信息。

关于iOS/swift : InAppPurchase invalidProductIdentifiers,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33944397/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com