• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

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

[复制链接]
菜鸟教程小白 发表于 2022-12-12 10:56:56 | 显示全部楼层 |阅读模式 打印 上一主题 下一主题

我正在尝试连接 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: "lease 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



Best Answer-推荐答案


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

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

回复

使用道具 举报

懒得打字嘛,点击右侧快捷回复 【右侧内容,后台自定义】
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

关注0

粉丝2

帖子830918

发布主题
阅读排行 更多
广告位

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap