Appfigurate™️
HomeDocumentation
  • Introducing Appfigurate™️ 3
  • Getting Started
    • Getting Started
    • Examples
    • Upgrade guide
      • v1.4.0 to v2.2.0
      • v2.1.1 to v2.2.0
      • v2.2.1 to v3.0.0
      • v3.2.1 to v4.0.0
    • iOS native app integration
      • iOS app extension integration
    • watchOS app integration
      • watchOS app extension integration
    • Android native app integration
    • Mobile Flutter integration
      • Flutter iOS
      • Flutter Android
    • React Native integration
      • iOS native module integration
      • Android native module integration
      • JavaScript integration
    • Third party remote configuration providers
      • Firebase Remote Config
      • Launch Darkly
      • Other third party remote configuration providers
  • Configuration subclasses
    • Supported property types
      • Boolean
      • Integer
      • Float
      • Double
      • Plain String
      • Encrypted String
    • Custom executable actions
    • Slider icon types
  • Additional reading
    • Info.plist options
    • AndroidManifest.xml options
    • Displaying overridden configuration
    • Security
      • Best practice
      • Encryption
      • Export compliance
      • App Store compliance
      • PrivacyInfo.xcprivacy
      • Rotating your private key
  • Automation testing
    • iOS native app automation testing
    • Android native automation testing
  • API
    • iOS and watchOS API
    • Android API
    • Mobile Flutter API
    • React Native API
  • Appfigurate User Guide
    • Introduction
    • Main menu
    • Select app
    • Add app
    • Import app
    • Install example apps
    • Settings
      • Passcode Lock
      • Restore
      • Backup
      • Delete all apps and Settings
      • Analytics
    • Edit app
    • Configure app
    • Permissions
  • Appfigurate SE user guide
    • Introduction
    • Manual encryption
      • ENCRYPTED_STRING macro/function
      • ENCRYPTED_STRING_IOS_WATCHOS macro/function
    • Setup iOS Simulator app
    • Setup Android Emulator app
    • Xcode source editor extension
      • Troubleshooting
    • Real device cloud testing services
      • BrowserStack
  • LEGAL
    • License Agreement
    • Privacy Policy
    • Release History
    • Third party notices
Powered by GitBook
On this page
  • Local properties
  • Editable UI
  • List UI
  • Editable List UI
  • Remote properties
  • Remote Editable UI
  1. Configuration subclasses
  2. Supported property types

Plain String

PreviousDoubleNextEncrypted String

Last updated 4 months ago

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 method.

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 method.

NSString properties should be declared in your subclass header file as follows:

@import AppfigurateLibrary;

@interface Configuration : APLConfiguration

@property(nonatomic, assign) double propertyName;
...

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 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 method.

The flutter class defers to the underlying platform (iOS) or (Android) subclass to read property values.

The React Native module AppfigurateModule class defers to the underlying platform (iOS) or (Android) subclass to read property values.

This page describes plain textual strings. Appfigurate also supports .

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"
    }
    ...

Objective-C prototype

STRING_PROPERTY_EDIT(propertyName, regex, description, restart)

Objective-C 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";
}
...

Kotlin prototype

@StringPropertyEdit(description, regularExpression, restart)
var propertyName: 

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: 
    
    override fun reset() {
        super.reset()
        usernameOverride = "thomas52"
    }
    ...

Java prototype

@StringPropertyEdit(description, regularExpression, restart)
String propertyName;

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;
    
    @Override
    public void reset() {
        super.reset();
        this.usernameOverride = "thomas52";
    }
    ...

Dart prototype

String get propertyName => nativeString('propertyName');

Dart example

import 'package:appfigurateflutter/appfigurateflutter.dart';

public class Configuration extends APLNativeConfiguration {

    String get usernameOverride => nativeString('usernameOverride');
    ...

JavaScript example

import {
  NativeModules,
} from 'react-native';

const {Appfigurate} = NativeModules;

...

let usernameOverride = await Appfigurate.nativeValue("usernameOverride");

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"
    }
    ...

Objective-C prototype

STRING_PROPERTY_LIST(propertyName, description, restart, ...)

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"});

- (void) reset {
    self.backgroundColorHex = "#d3d3d3";
}
...

Kotlin prototype

@StringPropertyList(description, keys, values, restart)
var propertyName: 

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: 
    
    override fun reset() {
        super.reset()
        backgroundColorHex = "#d3d3d3"
    }
    ...

Java prototype

@StringPropertyList(description, keys, values, restart)
String propertyName;

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;
    
    @Override
    public void reset() {
        super.reset();
        this.backgroundColorHex = "#d3d3d3";
    }
    ...

Dart prototype

String get propertyName => nativeString('propertyName');

Dart example

import 'package:appfigurateflutter/appfigurateflutter.dart';

public class Configuration extends APLNativeConfiguration {

    String get backgroundColorHex => nativeString('backgroundColorHex');
    ...

JavaScript example

import {
  NativeModules,
} from 'react-native';

const {Appfigurate} = NativeModules;

...

let backgroundColorHex = await Appfigurate.nativeValue("backgroundColorHex");

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"
    }
    ...

Objective-C prototype

STRING_PROPERTY_LIST_EDIT(propertyName, regex, description, restart, ...)

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"});

- (void) reset {
    self.foregroundColorHex = @"#ffe4e1";
}
...

Kotlin prototype

@StringPropertyListEdit(description, regularExpression, keys, values, restart)
var propertyName: 

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: 
    
    override fun reset() {
        super.reset()
        foregroundColorHex = "#ffe4e1"
    }
    ...

Java prototype

@StringPropertyListEdit(description, regularExpression, keys, values, restart)
String propertyName;

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;
    
    @Override
    public void reset() {
        super.reset();
        this.foregroundColorHex = 100.0;
    }
    ...

Dart prototype

String get propertyName => nativeString('propertyName');

Dart example

import 'package:appfigurateflutter/appfigurateflutter.dart';

public class Configuration extends APLNativeConfiguration {

    String get foregroundColorHex => nativeString('foregroundColorHex');
    ...

JavaScript example

import {
  NativeModules,
} from 'react-native';

const {Appfigurate} = NativeModules;

...

let foregroundColorHex = await Appfigurate.nativeValue("foregroundColorHex");

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"
    }
    ...

Objective-C prototype

REMOTE_STRING_PROPERTY_EDIT(propertyName, remoteKey, description)

Objective-C example

@import AppfigurateLibrary;

@interface Configuration : APLConfiguration

@property(nonatomic, assign) String appTitle;

@end

@implementation Configuration

REMOTE_STRING_PROPERTY_EDIT(appTitle, @"Title of application");

- (void) reset {
    self.appTitle = @"Holiday finder";
}
...

Kotlin prototype

@RemoteStringPropertyEdit(remoteKey, description)
var propertyName: 

Kotlin example

import nz.co.electricbolt.appfiguratelibrary.Configuration
import nz.co.electricbolt.appfiguratelibrary.annotations.RemoteStringPropertyEdit

class AppConfiguration : Configuration() {

    @RemoteStringPropertyEdit(remoteKey = "appTitle", description = "Title of application")
    var appTitle: 
    
    override fun reset() {
        super.reset()
        appTitle = "Holiday finder"
    }
    ...

Java prototype

@RemoteStringPropertyEdit(remoteKey, description)
String propertyName;

Java example

import nz.co.electricbolt.appfiguratelibrary.Configuration;
import nz.co.electricbolt.appfiguratelibrary.annotations.RemoteStringPropertyEdit;

public class AppConfiguration extends Configuration {

    @RemoteStringPropertyEdit(remoteKey = "appTitle", description = "Title of application")
    public String appTitle;
    
    @Override
    public void reset() {
        super.reset();
        this.appTitle = "Holiday finder";
    }
    ...

Dart prototype

String get propertyName => nativeString('propertyName');

Dart example

import 'package:appfigurateflutter/appfigurateflutter.dart';

public class Configuration extends APLNativeConfiguration {

    String get appTitle => nativeString('appTitle');
    ...

JavaScript example

import {
  NativeModules,
} from 'react-native';

const {Appfigurate} = NativeModules;

...

let appTitle = await Appfigurate.nativeValue("appTitle");

reset
reset
APLConfiguration
reset
reset
APLNativeConfiguration
APLConfiguration
nz.co.electricbolt.appfiguratelibrary.Configuration
APLConfiguration
nz.co.electricbolt.appfiguratelibrary.Configuration
encrypted strings