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

Updates for Swift 3.1 plus recent issue fixes and merging community PRs #97

Closed jrendel closed 5 years ago

jordanpwood commented 7 years ago

It looks like you are preparing a new release of this pod, yes? I am using SwiftKeychainWrapper in an app that I was going to release this week. However, I am seeing some strange behavior with getting values out of the keychain. I haven't yet ruled out the possibility that I'm doing something wrong in my code, but I really would like to try installing your changes to UnsafeMutablePointer handling. I would then be releasing the app soon after, so I'm wondering if the develop branch is fully ready for a release.

Thanks for your help!

jrendel commented 7 years ago

@jordanpwood I want to do some more testing before I merge these changes. The change to UnsafeMutablePointer/SecItemCopyMatching came through a community member and I like the cleaner syntax, but I'm trying to confirm still that is indeed the correct way to use the SecItemCopyMatching api now. Apple last updated their own GenericKeychain source in Sept 2016, and it still uses the unsafeMutablePointer.

https://developer.apple.com/library/content/samplecode/GenericKeychain/Listings/GenericKeychain_KeychainPasswordItem_swift.html

Are you able to test with the changes in the develop branch to see if that affects the issue you are seeing?

I also realized after making this PR, that there is an issue some have reported with using a custom Keychain instance instead of the .standard singleton reference that I need to test still. So I'm not quite ready to merge this and make a new pod release quite yet.

javierHolvi commented 6 years ago

Ey @jrendel how is the status on this? Specially the custom Keychain instance VS the singleton that you mentioned. Do you have any new pod release planned?

jordanpwood commented 5 years ago

I thought I had posted my results months ago, but I would like to report that the changes to UnsafeMutablePointer handling fixed a rare crash I was having, and I've been running commit 77f73c3 with no problems for over a year!