Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/workingdog/keychainclass
Swift simple keychain access class
https://github.com/workingdog/keychainclass
Last synced: about 5 hours ago
JSON representation
Swift simple keychain access class
- Host: GitHub
- URL: https://github.com/workingdog/keychainclass
- Owner: workingDog
- Created: 2023-06-14T12:31:06.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-05-03T01:40:03.000Z (6 months ago)
- Last Synced: 2024-05-03T09:06:48.946Z (6 months ago)
- Language: Swift
- Size: 15.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# KeychainClass
Swift simple keychain access classUsage:
KeychainInterface.service = "test.com.test"
KeychainInterface.account = "test.com.apikey"
func doSaveKey(_ theKey: String) {
// if there is no key, store `theKey` in keychain
if KeychainInterface.getKey() == nil {
KeychainInterface.setKey(key: theKey)
} else {
// if there is already a key in keychain, must use update to override the old one
KeychainInterface.updateKey(key: theKey)
}
}Note, make sure you have set your App.entitlements that includes:
keychain-access-groups
$(AppIdentifierPrefix)test.com.test