Skip to content

Commit 7287e5b

Browse files
committed
Add Usage to README
1 parent a93579f commit 7287e5b

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,21 @@
22

33
This is a [Skip](https://skip.tools) Swift/Kotlin library project providing a simple unified API to secure key/value storage. It uses the Keychain on Darwin platforms and EncyptedSharedPreferences on Android.
44

5+
6+
## Usage
7+
8+
```swift
9+
import SkipKeychain
10+
11+
let keychain = Keychain.shared
12+
13+
try keychain.set("value", forKey: "key")
14+
assert(keychain.string(forKey: "key") == "value")
15+
16+
try keychain.removeValue(forKey: "key")
17+
assert(keychain.string(forKey: "key") == nil)
18+
```
19+
520
## Building
621

722
This project is a Swift Package Manager module that uses the

0 commit comments

Comments
 (0)