6

I don't want to use NSUserDefaults as I have been told it's not a good way to save a username and password.

So I was going to use a Keychain, but I have never used them before. Can some one please just a give a quick example of one or point me in the direction of an example ? Thanks.

0

2 Answers 2

12

I Use the open source SSKeychain wrapper around the the C api used by the keychain.

It's convenient, easy to use, and works on Mac OS and iOS.

Sign up to request clarification or add additional context in comments.

5 Comments

+1 for great wrapper. Will this work on the simulator as well?
Works for me when I'm testing on the simulator.
I asked because I have heard that generic keychain for ios does not work on simulator. Is sskeychain a wrapper for geenricKeychain? if yes than even it should not work.. ?
@Abizern it says that it doesn't support in MAC 10.6 Does it support in Mac 10.7.4?
That's what it generally means when people specify support. If it doesn't support 10.6 it supports everything later than that.
4

This is the best I have found till date... It five a very simple implementation of saving passwords and username to keychain. Please remember to include security framework in your project.

https://web.archive.org/web/20160305031351/http://iosdevelopertips.com/core-services/using-keychain-to-store-username-and-password.html

Keep in mind that this doen't work on simulator.

1 Comment

The SSKeychain mentioned by Abizem seems the best option to me as it is very easy to implement.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.