0
我從雨燕2.3升級MYP roject到3使用未解決的標識符 「成功」 與SwiftyStoreKit
示例代碼SwiftyStoreKit的Github上:
.SwiftyStoreKit.purchaseProduct("com.musevisions.SwiftyStoreKit.Purchase1", quantity: 1, atomically: true) { result in
switch result {
case .success(let purchase):
我的代碼:
func purchase(_ productId : String) {
NetworkActivityIndicatorManager.NetworkOperationStarted()
SwiftyStoreKit.purchaseProduct(productId, completion: {
result in
NetworkActivityIndicatorManager.networkOperationFinished()
switch result
{
case success(let purchase):
(數量&原子上有默認值):
public class func purchaseProduct(_ productId: String, quantity: Int = 1, atomically: Bool = true, applicationUsername: String = "", completion: @escaping (PurchaseResult) -> Void) {