A Swift package that simplifies secure data storage using the Keychain
import KeychaintKitConform an enum to KeychainKey
enum KeychainKeys: String, KeychainKey {
case refreshToken
}Use the class KeychainService
/// Set item in Keychain
let refreshToken: String = "jR4QBvxK468Q9VqUrqoV96RQEVjflfBkaEv62Dea"
KeychainService.setItem(key: KeychainKeys.refreshToken, data: refreshToken)/// Get item from Keychain
let data = KeychainService.getItem(key: KeychainKeys.refreshToken, type: String.self)/// Delete item in Keychain
KeychainService.deleteItem(key: KeychainKeys.refreshToken)Handmade by Théo Sementa