订阅iOS自动续订订阅需要哪些最基本的步骤?
答案 0 :(得分:1)
想出来。假设你知道productID
:
第一
import StoreKit
然后在你的代码中
let productID: Set = ["monthly"]
let request = SKProductsRequest(productIdentifiers: productID)
request.delegate = self
request.start()
和SKProductsRequestDelegate
:
if response.products.count > 0 {
let product = response.products[0]
let payment = SKPayment(product: product)
SKPaymentQueue.defaultQueue().addPayment(payment)
}
非常欢迎您