diff --git a/README.md b/README.md index d927e36..38ccd97 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,24 @@ # KeychainWrapper -A description of this package. +A very simple wrapper around the iOS keychain. + +## Usage + +First instantiate `KeychainWrapper`, then use the instance to create, read or delete keychain entries, e.g.: + +```swift +let keychainWrapper = KeychainWrapper(service: "myApp") + +// store password <-> username mapping for service "myApp" +keychainWrapper["username"] = "secretPassword" + +// retrieve password for username +let password = keychainWrapper["username"] + +// delete password entry for username in service "myApp" +keychainWrapper["username"] = nil +``` + +## License + +See [LICENSE.md](LICENSE.md).