so I’m making an app and one page the user is going to type in a username and password. It will be stored in a string. Say this string was stored in the setting.m/.h files. How do I access them from other classes?
Share
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.
You should always use Keychain to store usernames and passwords, and since it’s stored securely and only accessible to your app. See Apple’s GenericKeychain sample code:
If you want to store other strings, ints, floats, or arrays that aren’t sensitive, then you should look into using NSUserDefaults.