ios - StoreKit 2 - 产品请求始终为空

标签 ios swift storekit

我正在尝试使用 StoreKit 2App Store Connect 获取产品,但总是返回一个空数组:

let keys = [
    "com.app.suscripcion.mes.1"
]
        
let storeProducts = try await Product.products(for: keys)

我在 InApp Purchase 部分添加了一个 key :

enter image description here

我需要做什么才能从 App Store Connect 获取产品?如果我使用 .storekit 配置文件,它可以工作,但在真实场景中不起作用

最佳答案

要解决此问题,App Store Connect 中的Account Holder,在Agreements, Tax, and Banking 中,需要为付费应用设置税务和银行业务,以便从 App Store Connect 获取 InApp Purchase 产品:

enter image description here

之后,付费应用类型的状态需要更改为 Active 才能使其正常工作。

关于ios - StoreKit 2 - 产品请求始终为空,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/71611088/

相关文章:

ios - Admob Banner 广告在 SpriteKit 切换场景时变为 Nil

objective-c - 语法 : assign method's property value to sql command

iphone - 如何升级/降级 iOS 自动续订订阅

iOS In App Purchase 在 invalidProductIdentifiers 数组中获取产品 ID

ios - 在实际查看 View Controller 中显示警报

ios - TableViewCell(SubView) 触发按钮显示 Segue 到新 View Controller

swift - cellForRowAt 中的代码在单元格类中的代码之后调用

swift - NSCoding 在 Swift 中不起作用

swift - type (string , anyobject) 没有下标成员

ios - inAppPurchases 空产品数组