gpt4 book ai didi

ios - SKProductsResponse 仅返回无效的产品 ID

转载 作者:塔克拉玛干 更新时间:2023-11-02 09:57:12 25 4
gpt4 key购买 nike

我正在尝试连接 IAP。该应用程序正在进行试飞。 bundle ID 和 appID 是正确的。

    func requestProductData(productIdentifier: String) {

let pIDS = Set([productIdentifier])

if SKPaymentQueue.canMakePayments() {
let request = SKProductsRequest(productIdentifiers: pIDS)
request.delegate = self
print("yes") // make sure we can pay
request.start()
} else {
let alert = UIAlertController(title: "In-App Purchases Not Enabled", message: "Please enable In App Purchase in Settings", preferredStyle: UIAlertControllerStyle.Alert)

alert.addAction(UIAlertAction(title: "Settings", style: UIAlertActionStyle.Default, handler: { alertAction in
alert.dismissViewControllerAnimated(true, completion: nil)

let url: NSURL? = NSURL(string: UIApplicationOpenSettingsURLString)
if url != nil {
UIApplication.sharedApplication().openURL(url!)
}

}))
alert.addAction(UIAlertAction(title: "Ok", style: UIAlertActionStyle.Default, handler: { alertAction in
alert.dismissViewControllerAnimated(true, completion: nil)
}))
self.viewController!.presentViewController(alert, animated: true, completion: nil)
}
}

func productsRequest(request: SKProductsRequest, didReceiveResponse response: SKProductsResponse) {

print("these are the response products: \(response.products)")
print(response.invalidProductIdentifiers)
print("received response")

}

我正在传递直接从 iTunes 复制的产品 ID。权利是正确的。 SKPaymentQueue.canMakePayments() 返回 true,但是即使我已经从测试设备上的商店注销,它也不会询问我的沙箱 ID。

我一直在设备和模拟器上进行测试,结果相同。任何帮助将不胜感激!

目前,这是应用内购买在 iTunes 中的样子。我可以提交一个新版本以供审核,但这似乎不正确,因为此应用程序尚未在应用程序商店中,仅在试飞中。

Your first In-App Purchase must be submitted with a new app version. Select it from the app’s In-App Purchases section and click Submit.

^整个指令 block 完全令人困惑。在阅读时我已经在应用程序内购买部分并且没有提交按钮。我已经上传了一个新版本,但仍然没有提交按钮。

enter image description here

最佳答案

我们没有在 iTunes Connect 的契约(Contract)部分填写银行账户信息。您必须填写并处理契约(Contract)才能退回任何产品。

关于ios - SKProductsResponse 仅返回无效的产品 ID,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36510128/

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