A helper class that provides a simple way of writing to and reading from a Keychain. The project also includes a demo app.
Copy TegKeychain.swift into your project.
TegKeychain.set("my key", value: "hello world")
TegKeychain.getString("key 1")
TegKeychain.delete("my key")
TegKeychain.clear()
In addition to String one cart write and read NSData objects.
TegKeychain.set("my key", value: nsDataObject)
TegKeychain.getData("my key")
The code is based on this gist: