testing - 为什么 IAP 产品数量为空?

标签 testing in-app-purchase

我向应用添加了三个应用内购买,它们处于“准备提交”状态。

我可以在模拟器上提交申请之前测试它们吗?

我问是因为

response.products 

当我使用这个方法时是空的。

func productsRequest(_ request: SKProductsRequest, didReceive response: SKProductsResponse) {
        if response.products.count != 0 {
            for product in response.products {
                print(product.localizedTitle)
            }
        }
    }

最佳答案

您还需要在 App Store Connect 中签署“付费应用协议(protocol)”才能测试产品。

此外,模拟器对于使用 StoreKit 进行任何测试总是很粗略,我建议在物理设备上进行测试。

关于testing - 为什么 IAP 产品数量为空?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57038636/

相关文章:

安卓测试自动化工具

ios - 我应该有注册/登录流程来在 tvOS 应用程序中实现应用程序内购买吗?

ios - 应用内购买恢复

android - 应用内购买在 android 中显示消息 "you already own this item."

testing - 如何以编程方式按下警报确定按钮?

testing - 谁做你的测试?

testing - Ember-auth 登录测试因 json 失败

android - android开发中应该做单元测试吗?

android - 应用程序公钥在android应用内计费中有什么用

ios - 如何在 objective-c 中的app purchase ios 10中实现