瀏覽代碼

Update README.md

Evgenii Neumerzhitckii 5 年之前
父節點
當前提交
e538f8bb04
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      README.md

+ 2 - 1
README.md

@@ -110,7 +110,8 @@ Use `withAccess` parameter to specify the security level of the keychain storage
 By default the `.accessibleWhenUnlocked` option is used. It is one of the most restrictive options and provides good data protection.
 
 ```
-KeychainSwift().set("Hello world", forKey: "key 1", withAccess: .accessibleWhenUnlocked)
+let keychain = KeychainSwift()
+keychain.set("Hello world", forKey: "key 1", withAccess: .accessibleWhenUnlocked)
 ```
 
 You can use `.accessibleAfterFirstUnlock` if you need your app to access the keychain item while in the background. Note that it is less secure than the `.accessibleWhenUnlocked` option.