By following the steps in this tutorial you can allow users to configure the various app settings in the default Settings app.
The settings are defined in one or more plist files (xml files). The files should be located under Files\Special\Settings.bundle.
The main settings file name is Root.plist:
You can use the SettingsCreator desktop application (written with B4J) to create these files:
The plist format is documented here: https://developer.apple.com/library...ction.html#//apple_ref/doc/uid/TP40007005-SW1
The SettingsCreator application is quite simple. Right click on the list to add new items.
B4i code
The Settings object from iPhone library (v1.20+) allows you to get or set the settings.
Each setting is made of a key and value. Similar to Maps.
You need to declare and initialize a Settings object and then you can get or put values:
Note that you can also create new keys (which will not be visible in the settings app).
The modified settings are saved automatically from time to time. You can call Settings.Synchronize to force the changes to be saved immediately.
The compiled settings creator utility is attached. The source code is available here: https://www.b4x.com/android/forum/threads/ios-settingscreator.48779/
The settings are defined in one or more plist files (xml files). The files should be located under Files\Special\Settings.bundle.
The main settings file name is Root.plist:
You can use the SettingsCreator desktop application (written with B4J) to create these files:
The plist format is documented here: https://developer.apple.com/library...ction.html#//apple_ref/doc/uid/TP40007005-SW1
The SettingsCreator application is quite simple. Right click on the list to add new items.
B4i code
The Settings object from iPhone library (v1.20+) allows you to get or set the settings.
Each setting is made of a key and value. Similar to Maps.
You need to declare and initialize a Settings object and then you can get or put values:
B4X:
Dim set As Settings
set.Initialize
Dim Toggle1 As Boolean = set.GetBoolean("ts1")
set.Put("sr1", 50)
The modified settings are saved automatically from time to time. You can call Settings.Synchronize to force the changes to be saved immediately.
The compiled settings creator utility is attached. The source code is available here: https://www.b4x.com/android/forum/threads/ios-settingscreator.48779/
Attachments
Last edited: