应用程式内的购物套件无法得到回应

时间:2018-07-12 05:35:05

标签: ios in-app-purchase

我正在编写的应用购买应用程序无法响应,并且不确定为什么还设置了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中调用获取产品并获取空集 任何帮助将不胜感激

0 个答案:

没有答案