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.
Is Apple's Password Manager Safe? Apple's own iCloud Keychain is a solid password manager, much better than Chrome's built-in option. Built around Apple's secure iCloud service — which you can learn about in our iCloud Drive review — Keychain offers a convenient and free way to store passwords on the go.
Open System Preferences, click the icon for Apple ID, and click the checkbox for Keychain. Then when you browse to a password-protected website, iCloud Keychain will ask if you want to save the password. Click Save Password and it'll be securely stored in your Keychain.
In iOS, apps have access to a single keychain (which logically encompasses the iCloud keychain). This keychain is automatically unlocked when the user unlocks the device and then locked when the device is locked. An app can access only its own keychain items, or those shared with a group to which the app belongs.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With