由于Swift 2即时通讯
无法使用参数为类型SKproductsRequest调用初始化程序
类型(productIdentifiers:Set)
对于我的NSSet
中的应用内购买标识符
if(SKPaymentQueue.canMakePayments()) {
let productID:NSSet = NSSet(objects:
"com.someurl.monthlyAutoRenewable",
"com.someurl.annualAutoRenewable")
let request: SKProductsRequest = SKProductsRequest(productIdentifiers: productID as Set<NSObject>)
request.delegate = self
request.start()
}
else {
}
最佳答案
更换let request: SKProductsRequest = SKProductsRequest(productIdentifiers: productID as Set<NSObject>)
用let request: SKProductsRequest = SKProductsRequest(productIdentifiers: productID as! Set<String>)
修复它