tyhopp/keychain
Swift module for interacting with [Keychain](https://developer.apple.com/documentation/security/keychain_services) via property wrapper.
Usage
// Define
@Keychain(service: "my-app") var token: String?
// Set
token = "my-token"
// Get
if let token = token {
print(token) // my-token
}
// Delete
token = nilPlatforms
- macOS 12.0+
- iOS 15.0+
- tvOS 15.0+
- watchOS 8.0+
See the CI config for exact tests that are run for each PR.
Licenses
The source code is adopted from these sources with a few small adjustments:
KeychainPasswordItemfrom AppleKeychainItemWrapperfrom Automattic
The licenses are linked in the source files and available in the repo without modification:
Package Metadata
Repository: tyhopp/keychain
Default branch: main
README: README.md