matthewpalmer / Locksmith

A powerful, protocol-oriented library for working with the keychain in Swift.
MIT License
2.92k stars 268 forks source link

"Type '[String : Any]?' has no subscript members" when trying to get a value from loadDataForUserAccount. #176

Closed dannymout closed 7 years ago

dannymout commented 7 years ago

Using Locksmith 3, Xcode 9 and Swift 4.

I'm trying to get a value from the dictionary loadDataForUserAccount() creates.

let accountFromKeychain = Locksmith.loadDataForUserAccount(userAccount: "account")
let username = accountFromKeychain["value"]

Trying to get a value from the dictionary is leading to the error: Type '[String : Any]?' has no subscript members