Plain String
Last updated
Last updated
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.
@import AppfigurateLibrary;
@interface Configuration : APLConfiguration
@property(nonatomic, strong) NSString* propertyName;
...
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.
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.
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.
The flutter APLNativeConfiguration
class defers to the underlying platform APLConfiguration
(iOS) or nz.co.electricbolt.appfiguratelibrary.Configuration
(Android) subclass to read property values.
The React Native module AppfigurateModule
class defers to the underlying platform APLConfiguration
(iOS) or nz.co.electricbolt.appfiguratelibrary.Configuration
(Android) subclass to read property values.
This page describes plain textual strings. Appfigurate also supports encrypted strings.
Allows a string property to be changed in Appfigurate using a text field with an optional regular expression validating input.
Prototype
STRING_PROPERTY_EDIT(propertyName, regex, description, restart)
Example
@import AppfigurateLibrary;
@interface Configuration : APLConfiguration
@property(nonatomic, strong) NSString* usernameOverride;
@end
@implementation Configuration
STRING_PROPERTY_EDIT(usernameOverride, @"", @"Overridden session username", NO);
- (void) reset {
self.usernameOverride = @"thomas52";
}
...
Prototype
@StringPropertyEdit(regex, description, restart)
var propertyName:
Example
import AppfigurateLibrary
@objcMembers class Configuration: APLConfiguration {
@StringPropertyEdit(regex: "", description: "Overridden session username", restart: false)
var usernameOverride:
override func reset() {
usernameOverride = "thomas52"
}
...
Prototype
@StringPropertyEdit(description, regularExpression, restart)
String propertyName;
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;
@Override
public void reset() {
super.reset();
this.usernameOverride = "thomas52";
}
...
Prototype
@StringPropertyEdit(description, regularExpression, restart)
var propertyName:
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:
override fun reset() {
super.reset()
usernameOverride = "thomas52"
}
...
Prototype
String get propertyName => nativeString('propertyName');
Example
import 'package:appfigurateflutter/appfigurateflutter.dart';
public class Configuration extends APLNativeConfiguration {
String get usernameOverride => nativeString('usernameOverride');
...
Example
import {
NativeModules,
} from 'react-native';
const {Appfigurate} = NativeModules;
...
let usernameOverride = await Appfigurate.nativeValue("usernameOverride");
Allows a string property to be changed in Appfigurate by allowing the user to select from a predefined list of valid choices.
Prototype
STRING_PROPERTY_LIST(propertyName, description, restart, ...)
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"});
- (void) reset {
self.backgroundColorHex = "#d3d3d3";
}
...
Prototype
@StringPropertyList(description, restart, values)
var propertyName:
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"
}
...
Prototype
@StringPropertyList(description, keys, values, restart)
String propertyName;
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;
@Override
public void reset() {
super.reset();
this.backgroundColorHex = "#d3d3d3";
}
...
Prototype
@StringPropertyList(description, keys, values, restart)
var propertyName:
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:
override fun reset() {
super.reset()
backgroundColorHex = "#d3d3d3"
}
...
Prototype
String get propertyName => nativeString('propertyName');
Example
import 'package:appfigurateflutter/appfigurateflutter.dart';
public class Configuration extends APLNativeConfiguration {
String get backgroundColorHex => nativeString('backgroundColorHex');
...
Example
import {
NativeModules,
} from 'react-native';
const {Appfigurate} = NativeModules;
...
let backgroundColorHex = await Appfigurate.nativeValue("backgroundColorHex");
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.
Prototype
STRING_PROPERTY_LIST_EDIT(propertyName, regex, description, restart, ...)
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"});
- (void) reset {
self.foregroundColorHex = @"#ffe4e1";
}
...
Prototype
@StringPropertyListEdit(regex, description, restart, values)
var propertyName:
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"
}
...
Prototype
@StringPropertyListEdit(description, regularExpression, keys, values, restart)
String propertyName;
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;
@Override
public void reset() {
super.reset();
this.foregroundColorHex = 100.0;
}
...
Prototype
@StringPropertyListEdit(description, regularExpression, keys, values, restart)
var propertyName:
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:
override fun reset() {
super.reset()
foregroundColorHex = "#ffe4e1"
}
...
Prototype
String get propertyName => nativeString('propertyName');
Example
import 'package:appfigurateflutter/appfigurateflutter.dart';
public class Configuration extends APLNativeConfiguration {
String get foregroundColorHex => nativeString('foregroundColorHex');
...
Example
import {
NativeModules,
} from 'react-native';
const {Appfigurate} = NativeModules;
...
let foregroundColorHex = await Appfigurate.nativeValue("foregroundColorHex");