Can I access the keychain on the iPhone?

davidmytton picture davidmytton · Oct 10, 2008 · Viewed 55.2k times · Source

This question discusses encrypting data on the iPhone using the crypt() function. As an alternative, is there a keychain on the iPhone and if so, what code would I use to access it in order to store login details and then retrieve them for us in an application?

Answer

Ben Gottlieb picture Ben Gottlieb · Oct 15, 2008

One other thing to note: the keychain APIs don't work in the simulator when using older versions (2.x, 3.x) of the iPhone SDK. This could save you a lot of frustration when testing!