https://github.com/workingdog/keychainclass
Swift simple keychain access class
https://github.com/workingdog/keychainclass
Last synced: 5 months 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 (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-05-03T01:40:03.000Z (about 1 year ago)
- Last Synced: 2024-12-31T06:13:09.409Z (7 months ago)
- Language: Swift
- Size: 15.6 KB
- Stars: 0
- Watchers: 0
- 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