Răsfoiți Sursa

Add new SKError code cloudServiceRevoked for iOS 10.3

Andrea Bizzotto 8 ani în urmă
părinte
comite
48a4c9e8a1
1 a modificat fișierele cu 3 adăugiri și 0 ștergeri
  1. 3 0
      SwiftyStoreKit-iOS-Demo/ViewController.swift

+ 3 - 0
SwiftyStoreKit-iOS-Demo/ViewController.swift

@@ -213,6 +213,7 @@ extension ViewController {
         }
     }
 
+    // swiftlint:disable cyclomatic_complexity
     func alertForPurchaseResult(_ result: PurchaseResult) -> UIAlertController? {
         switch result {
         case .success(let product):
@@ -236,6 +237,8 @@ extension ViewController {
                 return alertWithTitle("Purchase failed", message: "Access to cloud service information is not allowed")
             case .cloudServiceNetworkConnectionFailed: // the device could not connect to the nework
                 return alertWithTitle("Purchase failed", message: "Could not connect to the network")
+            case .cloudServiceRevoked: // user has revoked permission to use this cloud service
+                return alertWithTitle("Purchase failed", message: "Could service was revoked")
             }
         }
     }