jrendel / SwiftKeychainWrapper

A simple wrapper for the iOS Keychain to allow you to use it in a similar fashion to User Defaults. Written in Swift.
MIT License
1.59k stars 340 forks source link

Possible issue with incorrect errno usage #31

Closed botov closed 8 years ago

botov commented 8 years ago

As you know errno provides error code of the latest system code failed. So in the following method: public class func dataForKey(keyName: String) -> NSData? { ... probably this was meant here: return status == errSecSuccess ? result as? NSData : nil instead of this: return status == noErr ? result as? NSData : nil

botov commented 8 years ago

Sorry, I was wrong.

noErr OSErr: function performed properly - no error

I thought that's an Swift's equivalent of errno.