Plain String
The default value of a String
is nil. You must change the default value of the property by assigning a new value in an overridden reset
method.
This page describes plain textual strings. Appfigurate also supports encrypted strings.
Local properties
Editable UI
Allows a string property to be changed in Appfigurate using a text field with an optional regular expression validating input.
Swift prototype
@StringPropertyEdit(regex, description, restart)
var propertyName:
Swift example
import AppfigurateLibrary
@objcMembers class Configuration: APLConfiguration {
@StringPropertyEdit(regex: "", description: "Overridden session username", restart: false)
var usernameOverride:
override func reset() {
usernameOverride = "thomas52"
}
...
List UI
Allows a string property to be changed in Appfigurate by allowing the user to select from a predefined list of valid choices.
Swift prototype
@StringPropertyList(description, restart, values)
var propertyName:
Swift example
import AppfigurateLibrary
@objcMembers class Configuration: APLConfiguration {
@StringPropertyList(description: "Color of background", restart: false, values: ["LightGray":"#d3d3d3", "White":"#ffffff", "Beige":"f5fcdc"])
var backgroundColorHex:
override func reset() {
backgroundColorHex = "#d3d3de"
}
...
Editable List UI
Allows a string property to be changed in Appfigurate by allowing the user to select from a predefined list of valid choices. The user can customize the list adding by additional values using a text field and an optional regular expression validating input.
Swift prototype
@StringPropertyListEdit(regex, description, restart, values)
var propertyName:
Swift example
import AppfigurateLibrary
@objcMembers class Configuration: APLConfiguration {
@StringPropertyListEdit(regex: "^#([a-f0-9]{6})$", description: "Color of foreground", restart: false, values: ["Black":"#000000", "MistyRose":"#ffe4e1", "LightBlue":"add8e6"])
var foregroundColorHex:
override func reset() {
foregroundColorHex = "#ffe4e1"
}
...
Remote properties
Remote Editable UI
Third party remote configuration provider integration is currently in private beta and will be available in the next major release of Appfigurate.
Allows a third party remote configuration provider's string property to be changed locally in Appfigurate using a text field. If the override tick box is ticked off, the third party remote configuration provider's value is displayed. If the override tick box is ticked on, then you can use Appfigurate to locally override the value.
Swift prototype
@RemoteStringPropertyEdit(remoteKey, description, restart)
var propertyName: String
Swift example
import AppfigurateLibrary
@objcMembers class Configuration: APLConfiguration {
@RemoteStringPropertyEdit(remoteKey: "appTitle", description: "Title of application")
var appTitle: String
override func reset() {
appTitle = "Holiday finder"
}
...
Last updated