On Windows, we can write values into registry to know that
but how can I know if my application is the first time it runs on a mac? I need to perform some initialization task.
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.
You are looking for the class
NSUserDefaults(see Apple Documentation)For example:
You will use the same class to save and retrieve user preferences.
This values will be saved in
~/Library/Preferences/<your_bundle_id>.plist. This is useful to know for debugging, by looking at the file, but you should not rely on this implementation detail in your code.