I have a little Cocoa Application that needs to save its settings. Is it the best practice to save every time to user made a change or is it better to save once only when the application is ended?
Is there any event raised when the application should end or the window should close?
The NSUserDefaults class can (should) be used to manage users settings.
The class will save the user settings ‘from time to time’ and also before the app closes.
You can also force saving by calling the synchronize method.