Evgenii Neumerzhitckii 10 years ago
parent
commit
be5c7b997a
2 changed files with 14 additions and 1 deletions
  1. 13 0
      README.md
  2. 1 1
      keychainTests/keychainTests.swift

+ 13 - 0
README.md

@@ -31,6 +31,19 @@ TegKeychain.set(nsDataObject, forKey: "my key")
 TegKeychain.getData("my key")
 ```
 
+## Advanced options
+
+### Keychain item access
+
+Use `withAccess` attribute to specify when your app needs access to the text in the keychain item.
+By default the `.AccessibleWhenUnlocked` option is used. It is recommended to use most restrictive option that is suitable for you app in order provide the best data protection.
+
+```
+TegKeychain.set("Hello world", forKey: "key 1", withAccess: .AccessibleWhenUnlocked)
+```
+
+[See the list of all available options](http://google.com)
+
 ## Demo app
 
 <img src="https://raw.githubusercontent.com/exchangegroup/keychain-swift/master/graphics/keychain-swift-demo.png" alt="Sacing and reading text from Keychaing in iOS and Swift" width="320">

+ 1 - 1
keychainTests/keychainTests.swift

@@ -17,7 +17,7 @@ class keychainTests: XCTestCase {
     XCTAssertEqual("hello :)", TegKeychain.get("key 1")!)
   }
   
-  func testSetWithOptions() {
+  func testSetWithAccessOption() {
     TegKeychain.set("hello :)", forKey: "key 1", withAccess: .AccessibleAfterFirstUnlock)
   }