auth0/SimpleKeychain

'keychain()' is unavailable error with Swift

Closed this issue · 1 comments

Hi guys,

This line from the README :
A0SimpleKeychain.keychain().setString(jwt, forKey:"auth0-user-jwt")
gives me the following error :
'keychain()' is unavailable: use object construction 'A0SimpleKeychain()'

After reading the code a bit more, I changed the line to this and it works :
A0SimpleKeychain().setString(jwt, forKey:"auth0-user-jwt")

I'm not too sure why but it looks like the conversion from obj-c to swift is not working as expected, any ideas?

I'm using Xcode 6.1

That's because Swift believes it's a convenience constructor, I'll probably change the names to avoid that annoyance. In the meanwhile I'll update de examples in Swift to use the constructor instead of a method.
Thanks.