【问题标题】:Receiving zero products for in app purchase收到零产品以进行应用内购买
【发布时间】:2019-01-13 05:53:44
【问题描述】:

我在iTunes Connect中创建了一个应用内购买的消耗品,如下图所示。

之后我创建了一个沙盒用户并验证了该 appid。

当我尝试使用以下代码检查产品时

func requestProducts(forIds ids: Set<String>)
{
    productRequest.cancel()
    productRequest = SKProductsRequest(productIdentifiers: "com.iapcourse.meal")
    productRequest.delegate = self
    productRequest.start()
}

func productsRequest(_ request: SKProductsRequest, didReceive response: SKProductsResponse) {
    self.products = response.products
    print(products.count)
    if products.count == 0
    {
        requestProducts(forIds: "com.iapcourse.meal")
    }
    else {
        delegate?.iapProductsLoaded()
    }
}

我从委托方法收到零产品。

【问题讨论】:

  • 元数据丢失,先补全其数据。
  • 它不工作
  • 确保您使用相同的帐户登录 xcode。

标签: ios swift in-app-purchase app-store-connect sandbox


【解决方案1】:

您的应用内购买状态需要处于“准备提交”阶段,然后您才能在 Sandbox 中进行测试。一个常见的错过是预览图像,为了测试,你可以上传任何你想要的东西,这样元数据就完成了。此外,您需要确保已签署“付费应用程序”协议 - App Store connect 中的任何地方都不清楚这是必需的,因此有时会被忽略。

我非常好的文章涵盖了您需要配置的所有内容的清单:Configuring In-app Products is Hard

【讨论】:

  • 实际上我缺少的是付费应用协议签署
【解决方案2】:

据我发现,元数据并不重要。重要的问题是签署用户协议和税务论坛

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-08-15
    • 1970-01-01
    • 1970-01-01
    • 2015-08-14
    • 2015-04-13
    相关资源
    最近更新 更多