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

This is a Swift wrapper around the ObjC wrapper, not a Swift re-write #20

Closed lfaoro closed 9 years ago

lfaoro commented 9 years ago

How can this be a Swift rewrite when you're still using the main ObjC method inside of it. return KeychainObjcWrapper.dataForDictionary(keychainQueryDictionary)

jrendel commented 9 years ago

Check out this issue to see how it got to this point: https://github.com/jrendel/SwiftKeychainWrapper/issues/4

The short answer is that this was a complete Swift rewrite. But then a bug was found when compiled for release and we couldn't sort out a good solution. At the time, using the objective c wrapper was the best option.

I haven't had time to do much with this but I'm planning another rewrite for Swift 2.0. My goal is to further align it with how NSUserDefaults works and get rid of it being a static class.

jrendel commented 9 years ago

Hey @lfaoro what version of the source are you looking at? I was thinking about this last night and while it was true at one point I was using the ObjC wrapper, I forgot that eventually a proper fix was found and that was taken out. The latest code in master no longer has the KeychainObjcWrapper class.

lfaoro commented 9 years ago

Hey @jrendel

I checked the source the same day I wrote the issue. I'll sync to the latest commit and check again.

Thanks!

jrendel commented 9 years ago

I found the develop branch was way out of date. The master branch was getting ahead due to pull requests against it and I made some changes directly to it. So you most likely were looking at the develop branch. I merged it up to date with master this morning.

lfaoro commented 9 years ago

Well, wasn't aware of that, usually is the develop branch that is ahead of master and pull request should be sent to the develop branch :)

yunnnyunnn commented 9 years ago

So...may I ask is the master branch still using KeychainObjcWrapper?

jrendel commented 9 years ago

Master branch has not been using KeychainObjcWrapper for quite a few releases. And I recently updated the dev branch so its on track with master. I'm closing this issue now since its a non issue.