Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I store a password in Cocoa preferences?

I was going to store a password in my Cocoa application in the NSUserDefaults but then I realized that it is stored in plain text.

How do you store password credentials for Cocoa applications?

like image 223
Cyrus Avatar asked Feb 21 '23 11:02

Cyrus


1 Answers

Passwords should be stored in the Keychain. You should probably look at the Keychain Services Programming Guide to begin with. The Keychain exists on both iOS and OS X platforms.

like image 190
mttrb Avatar answered Mar 06 '23 04:03

mttrb