-
-
Notifications
You must be signed in to change notification settings - Fork 35
Open
Description
I'm trying to store struct object but not work.
struct InstagramApiUser: Codable {
var access_token: String
var user_id: Int
}
storing with:
let json = try JSONDecoder().decode(InstagramApiUser.self, from: data)
KeychainPreferences.sharedInstance[InstagramClient.keychain_api_user_key, .archive] = json
retrieving with:
if let user = self.keychain.object(forKey: InstagramClient.keychain_api_user_key) as? InstagramApiUser {
print("- OAuth2 user api: \(String(describing: self.user_api))")
}
Metadata
Metadata
Assignees
Labels
No labels