ios - SKProductsResponse 仅返回无效的产品 ID
<p><p>我正在尝试连接 IAP。该应用程序正在试飞。 bundleID 和 appID 正确。 </p>
<pre><code> func requestProductData(productIdentifier: String) {
let pIDS = Set()
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")
}
</code></pre>
<p>我传递的是直接从 iTunes 复制的产品 ID。权利是正确的。 <code>SKPaymentQueue.canMakePayments()</code> 返回 true,但是即使我已经在测试设备上注销了商店,它也不会询问我的沙盒 ID。 </p>
<p>我一直在设备和模拟器上进行测试,结果相同。任何帮助将不胜感激!</p>
<p>目前这是 iTunes 中应用内购买的样子。我可以提交新版本以供审核,但这似乎不正确,因为此应用程序尚未在应用商店中,仅在试飞中。 </p>
<blockquote>
<p>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.</p>
</blockquote>
<p>^整个指令 block 完全令人困惑。在阅读我已经在应用内购买部分并且没有提交按钮时。我已经上传了一个新版本,但仍然没有提交按钮。</p>
<p> <a href="/image/EAsfr.png" rel="noreferrer noopener nofollow"><img src="/image/EAsfr.png" alt="enter image description here"/></a> </p></p>
<br><hr><h1><strong>Best Answer-推荐答案</ strong></h1><br>
<p><p>我们没有在 iTunes Connect 的契约(Contract)部分填写银行账户信息。您必须填写并处理契约(Contract)才能退回任何产品。</p></p>
<p style="font-size: 20px;">关于ios - SKProductsResponse 仅返回无效的产品 ID,我们在Stack Overflow上找到一个类似的问题:
<a href="https://stackoverflow.com/questions/36510128/" rel="noreferrer noopener nofollow" style="color: red;">
https://stackoverflow.com/questions/36510128/
</a>
</p>
页:
[1]