I have created a settings bundle with a single preference value, a text field with a default value.
When my application launches and I retrieve the value it is null. Do I have to manually code the value to use before the user has provided a value?
Also if the user does to the preferences screen and enters the text field then leave it without making any changes the value will not be set … the user has to actually change the value for it to be saved, is this correct?
No, don’t do that.
There’s a function for this:
You can build the parameter by iterating all the sub keys of
PreferenceSpecifiersin your settingsplistfile.Something like this: