我在 App Store 连接帐户中有 3 次应用内购买(不可续订的订阅),均已在代码中成功批准和检索
然后我又添加了一个免费的不可续订的应用内购买,提交到应用商店新的应用内购买被批准,所有协议都有效,税务和银行信息是好的,代码中的产品标识符与在App Store 连接
我在 SKProductsRequest 中请求所有四个产品但在 productsRequest(_ request: SKProductsRequest, didReceive response: SKProductsResponse) 我收到三个旧的应用内购买 SKProducts,但在 invalidProductIdentifiers 中收到新的应用内购买的产品标识符
func fetchProducts() {
let request = SKProductsRequest(productIdentifiers: ["mentalmind.kz.free", "mentalmind.kz.threemonth", "mentalmind.kz.sixmonth", "mentalmind.kz.oneyear"])
request.delegate = self
request.start()
}
func productsRequest(_ request: SKProductsRequest, didReceive response: SKProductsResponse) {
print("received products: \(response.products.map({ $0.productIdentifier }))")
print("invalid product ids: \(response.invalidProductIdentifiers)")
DispatchQueue.main.async {
self.products = response.products
}
}
控制台输出:
received products: ["mentalmind.kz.oneyear", "mentalmind.kz.sixmonth", "mentalmind.kz.threemonth"]
invalid product ids: ["mentalmind.kz.free"]
是苹果的错,还是你有什么代码推荐给我?