EMKeychain update

I originally found EMKeychain a few months back and added it to my project to take over managing interactions between my app and the Keychain. It worked well until I updated to Snow Leopard and started using the LLVM GCC 4.2 compiler. Doing so threw some new errors about non-explicit casts and deprecated methods. I went in search of an update on Extendmac's site and by chance found @sdegutis's fork of the project on GitHub.

I forked the project here and started replacing my current EMKeychain setup with this new one. The newer isn't terribly different but it went from 4 files to 2, and we're not using "proxy" object anymore instead just class methods for getting / creating keychain items.

One thing I did notice is the inconsistent results, but I don't think it's due to this newer version. I created a temp project and ran a loop getting and printing a specific keychain password 10 times and got the actual password, null, or the password with some extra characters at random times. Not encouraging.

Luckily I did track down the issue; the raw char password wasn't being converted to an NSString object correctly, so I was able to write a patch using the C strncpy method. You can check out my *fixed* version with the link above, but I did find in the network what is probably a better fix with user irons fork, which I plan on integrating soon.

Stackoverflow

About this Entry

This page contains a single entry by Clint Shryock published on October 7, 2009 12:35 PM.

iPhone was the previous entry in this blog.

Using Zend Tool is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.