Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tyhopp/keychain
Keychain property wrapper
https://github.com/tyhopp/keychain
keychain keychain-wrapper swift
Last synced: 15 days ago
JSON representation
Keychain property wrapper
- Host: GitHub
- URL: https://github.com/tyhopp/keychain
- Owner: tyhopp
- License: gpl-2.0
- Created: 2023-04-07T09:33:07.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-04-07T14:46:40.000Z (almost 2 years ago)
- Last Synced: 2024-12-07T02:33:53.953Z (about 1 month ago)
- Topics: keychain, keychain-wrapper, swift
- Language: Swift
- Homepage:
- Size: 18.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE-KeychainItemWrapper.md
Awesome Lists containing this project
README
# Keychain
Swift module for interacting with [Keychain](https://developer.apple.com/documentation/security/keychain_services) via property wrapper.
## Usage
```swift
// Define
@Keychain(service: "my-app") var token: String?// Set
token = "my-token"// Get
if let token = token {
print(token) // my-token
}// Delete
token = nil
```## Platforms
- macOS 12.0+
- iOS 15.0+
- tvOS 15.0+
- watchOS 8.0+See the [CI config](./.github/workflows/test.yaml) for exact tests that are run for each PR.
## Licenses
The source code is adopted from these sources with a few small adjustments:
- [`KeychainPasswordItem`](https://developer.apple.com/library/archive/samplecode/GenericKeychain/Listings/GenericKeychain_KeychainPasswordItem_swift.html) from Apple
- [`KeychainItemWrapper`](https://github.com/Automattic/simplenote-ios/blob/3c404525449672d08e93380b4ef4a30054de1847/Simplenote/Classes/KeychainManager.swift) from AutomatticThe licenses are linked in the source files and available in the repo without modification:
- [KeychainPasswordItem](./LICENSE-KeychainPasswordItem.md)
- [KeychainItemWrapper](./LICENSE-KeychainItemWrapper.md)