Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
SharedKeychain Property Wrapper
struct SharedKeychain {
let key: String
var wrappedValue: String? {
get {
return Global.sharedKeychain[string: key]
set {
if let value = newValue {
try? Global.sharedKeychain.set(value, key: key)
} else {
try? Global.sharedKeychain.remove(key)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment