我要求提供产品,这是我的课程
class InAppC: UITableViewController, SKProductsRequestDelegate, SKPaymentTransactionObserver {
和视图加载中的产品需求
if (SKPaymentQueue.canMakePayments()) {
var productIDs:NSSet = NSSet(objects: productOne, productTwo, productThree, productFour, productFive)
var productsRequest:SKProductsRequest = SKProductsRequest(productIdentifiers: productIDs)
productsRequest.delegate = self
productsRequest.start()
}else{
println("can't make purchases")
}
这是委托函数
func productsRequest(request: SKProductsRequest!, didReceiveResponse response: SKProductsResponse!) {
println("product found")
}
它在iOS 8中打印找到的产品,但我不确定为什么它不能在iOS 7设备上打印? 委派错误说无法连接到iTunes商店