I have a simple application, based of the "Utility Application" template. It retrieves a password-protected XML file (via NSXMLParser).
I want to allow the user to set a username and password in the "FlipsideView", how would I go about this?
I have the basics in place, the two UITextField boxes, the value of which gets set to a fixed value when the view loads (using the viewWillAppear
method), and NSLog'd when the view is closed (the NSLog
is just for testing, obviously, in the viewWillDisappear
method)
How do I store the data? I've had a look at the Developer documentation, and it seems like I should be using NSUserDefaults
..?
Icon via Apple Inc. iCloud Keychain serves as a basic password manager for your iPhone and iPad. Through Keychain, you can save passwords for websites and apps and then retrieve them when you need to sign back into those sites and apps.
iCloud Password Manager on Mac A legacy tool built into macOS called "Keychain Access" acts as a catch-all app for authentication certificates, passwords, and other security prompts. However, as of macOS Monterey, there's a more user-friendly option within the System Preferences app.
Securely save them on your iPhone instead. If you deal with a significant number of websites and online services on a daily basis, then you must have lots of passwords to remember. Since using the same password for every account is not the best option, it's much safer to store the passwords on your iPhone.
I agree with Ben. This is exactly what the Keychain is for.
I would not, under any circumstances simply store passwords in the defaults as dbr suggests. This is highly insecure. You're essentially storing your passwords in the open.
In addition to Apple's sample code, I also recommend Buzz Anderson's Keychain code: iPhone Keychain Code
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