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 339 forks source link

Keychainwrapper has no member standard #83

Closed sriteja25 closed 7 years ago

sriteja25 commented 7 years ago

I have been using Keychainwrapper for a little over a month developing my app. I get 'Keychainwrapper has no member standard' error since today morning, I havent changed anything. Can anyone help me out with this ?

jrendel commented 7 years ago

Sorry for the late reply on this. I have not made any updates recently, so there's no reason why it should break for you unless you just recently upgraded to the Swift 3.0 version?

As @romanvolkov-io pointed out, use KeychainWrapper.standard for default access. You can see example usage in the unit tests here: https://github.com/jrendel/SwiftKeychainWrapper/blob/develop/SwiftKeychainWrapperTests/KeychainWrapperDefaultWrapperTests.swift

You can also use a custom instance of the wrapper. If you are doing that, you don't need to call .standard on your object. The SwiftKeychainExample repo has a example of using it this way: https://github.com/jrendel/SwiftKeychainWrapperExample/blob/master/SwiftKeychainWrapperExample/ViewController.swift

sriteja25 commented 7 years ago

Thank you for the reply, I dont know why I had the issue, reinstalling the keychainwrapper pod again solved the issue.