Where is NSDefaults stored on iphone?
Is it a good practice to store UserName and password in NSDefaults?
Thanks
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
All you really need to know is that the data is saved, is backed up and is available between restarts.
It is not, however, secure. You shouldn’t really use it for storing passwords or anything else that’s likely to be sensitive. Lots of apps do this anyway, even some big names, but it’s certainly not good practice. The keychain can be used when you need something more secure, though it’s not as easy to use as
NSUserDefaults.