Links
Comment on page

Plain String

Objective-C (iOS, watchOS)

The default value of a NSString is nil. You must change the default value of the property by assigning a new value in an overridden reset method.
@property(strong) NSString* propertyName;
This page describes plain textual strings. Appfigurate also supports encrypted strings.

NSString editable implementation

STRING_PROPERTY_EDIT(propertyName, regex, description, restart)
The NSString property can be changed in Appfigurate using a text field with an optional regular expression validating input.
Objective-C example
@import AppfigurateLibrary;
@interface Configuration : APLConfiguration
@property(nonatomic, strong) NSString* usernameOverride;
@end
@implementation Configuration
STRING_PROPERTY_EDIT(usernameOverride, @"", @"Overridden session username", NO);
...
Appfigurate UI element example

NSString list implementation

STRING_PROPERTY_LIST(propertyName, description, restart, ...)
The NSString property can be changed in Appfigurate by allowing the user to select from a predefined list of valid choices.
Objective-C example
@import AppfigurateLibrary;
@interface Configuration : APLConfiguration
@property(nonatomic, strong) NSString* backgroundColorHex;
@end
@implementation Configuration
STRING_PROPERTY_LIST(backgroundColorHex, @"Color of background", NO, @{@"LightGray": @"#d3d3d3", @"White": @"#ffffff", @"Beige": @"f5fcdc"});
...
Appfigurate UI element example

NSString editable list implementation

STRING_PROPERTY_LIST_EDIT(propertyName, regex, description, restart, ...)
The NSString property can 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.
Objective-C example
@import AppfigurateLibrary;
@interface Configuration : APLConfiguration
@property(nonatomic, strong) NSString* foregroundColorHex;
@end
@implementation Configuration
STRING_PROPERTY_LIST_EDIT(foregroundColorHex, @"^#([a-f0-9]{6})$", @"Color of foreground", NO, @{@"Black": @"#000000", @"MistyRose": @"#ffe4e1", @"LightBlue": @"add8e6"});
...
Appfigurate UI element example

Swift (iOS, watchOS)

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.

String editable implementation

@StringPropertyEdit(regex, description, restart)
var propertyName: String
The String property can be changed in Appfigurate using a text field with an optional regular expression validating input.
Swift example
import AppfigurateLibrary
@objcMembers class Configuration: APLConfiguration {
@StringPropertyEdit(regex: "", description: "Overridden session username", restart: false)
var usernameOverride: String
...
Appfigurate UI element example

String list implementation

@StringPropertyList(description, restart, values)
var propertyName: String
The String property can be changed in Appfigurate by allowing the user to select from a predefined list of valid choices.
Swift example
import AppfigurateLibrary
@objcMembers class Configuration: APLConfiguration {
@StringPropertyList(description: "Color of background", restart: false, values: ["LightGray":"#d3d3d3", "White":"#ffffff", "Beige":"f5fcdc"])
var backgroundColorHex: String
...
Appfigurate UI element example

String editable list implementation

@StringPropertyListEdit(regex, description, restart, values)
var propertyName: String
The String property can 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 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: String
...
Appfigurate UI element example

Java (Android)

The default value of a String is null. 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.

String editable implementation

@StringPropertyEdit(description, regularExpression, restart)
String propertyName;
The String property can be changed in Appfigurate using a text field with an optional regular expression validating input.
Java example
import nz.co.electricbolt.appfiguratelibrary.Configuration;
import nz.co.electricbolt.appfiguratelibrary.annotations.StringPropertyEdit;
public class AppConfiguration extends Configuration {
@StringPropertyEdit(description = "Overridden session username", regularExpression = "", restart = false)
public String usernameOverride;
...
Appfigurate UI element example

String list implementation

@StringPropertyList(description, keys, values, restart)
String propertyName;
The String property can be changed in Appfigurate by allowing the user to select from a predefined list of valid choices.
Java example
import nz.co.electricbolt.appfiguratelibrary.Configuration;
import nz.co.electricbolt.appfiguratelibrary.annotations.StringPropertyList;
public class AppConfiguration extends Configuration {
@StringPropertyList(description = "Color of background", keys = {"LightGray", "White", "Beige"}, values = {"#d3d3d3", "#ffffff", "f5fcdc"}, restart = false)
public String backgroundColorHex;
...
Appfigurate UI element example

String editable list implementation

@StringPropertyListEdit(description, regularExpression, keys, values, restart)
String propertyName;
The String property can 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.
Java example
import nz.co.electricbolt.appfiguratelibrary.Configuration;
import nz.co.electricbolt.appfiguratelibrary.annotations.StringPropertyListEdit;
public class AppConfiguration extends Configuration {
@StringPropertyListEdit(description = "Color of foreground", regularExpression = "^#([a-f0-9]{6})$", keys = {"Black", "MistyRose", "LightBlue"}, values = {"#000000", "#ffe4e1", "add8e6"}, restart = false)
public String foregroundColorHex;
...
Appfigurate UI element example

Kotlin (Android)

The default value of a String is null. 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.

String editable implementation

@StringPropertyEdit(description, regularExpression, restart)
var propertyName: String? = null
The String property can be changed in Appfigurate using a text field with an optional regular expression validating input.
Kotlin example
import nz.co.electricbolt.appfiguratelibrary.Configuration
import nz.co.electricbolt.appfiguratelibrary.annotations.StringPropertyEdit
class AppConfiguration : Configuration() {
@StringPropertyEdit(description = "Overridden session username", regularExpression = "", restart = false)
var usernameOverride: String? = null
...
Appfigurate UI element example

String list implementation

@StringPropertyList(description, keys, values, restart)
var propertyName: String? = null
The String property can be changed in Appfigurate by allowing the user to select from a predefined list of valid choices.
Kotlin example
import nz.co.electricbolt.appfiguratelibrary.Configuration
import nz.co.electricbolt.appfiguratelibrary.annotations.StringPropertyList
class AppConfiguration : Configuration() {
@StringPropertyList(description = "Color of background", keys = ["LightGray", "White", "Beige"], values = ["#d3d3d3", "#ffffff", "f5fcdc"], restart = false)
var backgroundColorHex: String? = null
...
Appfigurate UI element example

String editable list implementation

@StringPropertyListEdit(description, regularExpression, keys, values, restart)
var propertyName: String? = null
The String property can 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.
Kotlin example
import nz.co.electricbolt.appfiguratelibrary.Configuration
import nz.co.electricbolt.appfiguratelibrary.annotations.StringPropertyListEdit
class AppConfiguration : Configuration() {
@StringPropertyListEdit(description = "Color of foreground", regularExpression = "^#([a-f0-9]{6})$", keys = ["Black", "MistyRose", "LightBlue"], values = ["#000000", "#ffe4e1", "add8e6"], restart = false)
var foregroundColorHex: String? = null
...
Appfigurate UI element example

Dart (Flutter for iOS, Flutter for Android)

The flutter APLNativeConfiguration class defers to the underlying platform APLConfiguration (iOS) or nz.co.electricbolt.appfiguratelibrary.Configuration (Android) subclass to read property values.
The underlying platform property value can either be a plain textual string or an encrypted string.

String implementation

String get propertyName => nativeString('propertyName');
Dart example
import 'package:appfigurateflutter/appfigurateflutter.dart';
public class Configuration extends APLNativeConfiguration {
String get foregroundColorHex => nativeString('foregroundColorHex');
...