Selaa lähdekoodia

Preventing the user from using clear on macOS

Yannick Weiss 6 vuotta sitten
vanhempi
commit
0f9e28c424
1 muutettua tiedostoa jossa 1 lisäystä ja 0 poistoa
  1. 1 0
      Sources/KeychainSwift.swift

+ 1 - 0
Sources/KeychainSwift.swift

@@ -266,6 +266,7 @@ open class KeychainSwift {
   
   */
   @discardableResult
+  @available(macOS, unavailable, message: "Not implemented on macOS, call delete for every key.")
   open func clear() -> Bool {
     // The lock prevents the code to be run simlultaneously
     // from multiple threads which may result in crashing