mergSettings is an iOS External that integrates a LiveCode app with the Settings app and also includes InAppSettingsKit to present a matching dialog from within your app.
mergSettings contains InAppSettingsKit.
Copyright (c) 2009-2010: Luc Vandal, Edovia Inc., https://www.edovia.com Ortwin Gentz, FutureTap GmbH, https://www.futuretap.com All rights reserved. It is appreciated but not required that you give credit to Luc Vandal and Ortwin Gentz, as the original authors of this code. You can give credit in a blog post, a tweet or on a info page of your app. Also, the original authors appreciate letting them know if you use this code. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. This code is licensed under the BSD license that is available at: https://www.opensource.org/licenses/bsd-license.php
The Settings app and InAppSettingsKit both read the files in a folder called Settings.bundle. There is an example in the download and more information on editing the Settings bundle in the apple developer library.
mergSettings Syntax
command mergSettings [pTitle]
Syntax example:
mergSettings "mergSettings Prefs" |
Presents a modal settings dialog using InAppSettingsKit.
Parameters:
- pTitle - (optional) sets the title of the dialog
command mergSettingsSetStringForKey pKey,pValue
Syntax example:
mergSettingsSetStringForKey "name",tStringValue |
Sets the setting for the specified key.
Parameters:
- pKey - the setting key
- pValue - the setting value (string)
command mergSettingsSetNumberForKey pKey,pValue
Syntax example:
mergSettingsSetNumberForKey "level",tNumberValue |
Sets the setting for the specified key.
Parameters:
- pKey - the setting key
- pValue - the setting value (number)
command mergSettingsSetBoolForKey pKey,pValue
Syntax example:
mergSettingsSetStringForKey "ask_me_later",tBooleanValue |
Sets the setting for the specified key.
Parameters:
- pKey - the setting key
- pValue - the setting value (boolean)
function mergSettingsGetValueForKey pKey
Syntax example:
mergSettingsGetValueForKey("name") into tUsername |
Sets the setting for the specified key.
Parameters:
- pKey - the setting key