浏览代码

Fix @unknown default warnings in demo code

bizz84 6 年之前
父节点
当前提交
e3b0e5e823
共有 2 个文件被更改,包括 4 次插入0 次删除
  1. 2 0
      SwiftyStoreKit-iOS-Demo/AppDelegate.swift
  2. 2 0
      SwiftyStoreKit-macOS-Demo/AppDelegate.swift

+ 2 - 0
SwiftyStoreKit-iOS-Demo/AppDelegate.swift

@@ -54,6 +54,8 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
                     print("\(purchase.transaction.transactionState.debugDescription): \(purchase.productId)")
                 case .failed, .purchasing, .deferred:
                     break // do nothing
+                @unknown default:
+                    break // do nothing
                 }
             }
         }

+ 2 - 0
SwiftyStoreKit-macOS-Demo/AppDelegate.swift

@@ -47,6 +47,8 @@ class AppDelegate: NSObject, NSApplicationDelegate {
                     print("\(purchase.transaction.transactionState.debugDescription): \(purchase.productId)")
                 case .failed, .purchasing, .deferred:
                     break // do nothing
+                @unknown default:
+                  break // do nothing
                 }
             }
         }