2
0
Эх сурвалжийг харах

Add new SKError code cloudServiceRevoked for iOS 10.3

Andrea Bizzotto 8 жил өмнө
parent
commit
48a4c9e8a1

+ 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")
             }
         }
     }