我正在编写的应用购买应用程序无法响应,并且不确定为什么还设置了iTunesConnect,并且我确定我的产品ID相同
import Foundation
import StoreKit
class InAppPurchases: NSObject, SKProductsRequestDelegate {
func productsRequest(_ request: SKProductsRequest, didReceive response: SKProductsResponse) {
print(response.products)
}
private override init() { }
static let shared = InAppPurchases()
func getProducts() {
let products: Set = ["com.google.sites.xxx.app.product"]
let request = SKProductsRequest(productIdentifiers: products)
request.delegate = self
request.start()
}
}
在viewdidload中调用获取产品并获取空集 任何帮助将不胜感激