NSUserDefaults answer is the first thing that appeared in my head, but after thinking it over, I will make another suggestion. A bit more work, but it's worth considering. The motive is that sometimes when troubleshooting, the Apple application recommends deleting this application plist file. This is a fairly common troubleshooting method. I would recommend storing your boolean in your plist file instead of NSUserDefaults.
Disclaimer: I am only developing iOS, so Iβm not sure how NSUserDefaults and plists interact on Mac, and I donβt know that everything is involved in the fact that your plist lives in ~ / Library / Application \ Support / Preferences / com .mycompany.MyAppName.plist
In any case, I assume that this requires some code that can actually create a "fresh" plist (perhaps a copy from the template file in your kit), and you will do this if it starts and does not see plist. The default plate should not include a flag that allows your users to skip the code "first time", but if they opened the application earlier and then removed plist, they should return the default behavior.
This is an important behavior to support, where possible, to support our users if our application ever creates problems.
source share