Bool properties must be either true or false. The default value of a Bool property is false. You can change the default value of the property by assigning a new value in an overridden reset method.
BOOL properties must be either YES or NO. The default value of a BOOL property is NO. You can change the default value of the property by assigning a new value in an overridden reset method.
BOOL properties should be declared in your APLConfiguration subclass header file as follows:
Boolean properties must be either true or false. The default value of a Boolean property is false. You can change the default value of the property by assigning a new value in an overridden reset method.
boolean properties must be either true or false. The default value of a boolean property is false. You can change the default value of the property by assigning a new value in an overridden reset method.
@BooleanProperty(description, restart)
var propertyName = false
If restart is true, then the app will be restarted if the property value changes.
Kotlin example
import nz.co.electricbolt.appfiguratelibrary.Configuration
import nz.co.electricbolt.appfiguratelibrary.annotations.BooleanProperty
public class AppConfiguration : Configuration() {
@BooleanProperty(description = "Enable debug logging to console", restart = false)
var logging = false
override fun reset() {
super.reset()
logging = true
}
...
Java prototype
@BooleanProperty(description, restart)
public boolean propertyName;
If restart is true, then the app will be restarted if the property value changes.
Java example
import nz.co.electricbolt.appfiguratelibrary.Configuration;
import nz.co.electricbolt.appfiguratelibrary.annotations.BooleanProperty;
public class AppConfiguration extends Configuration {
@BooleanProperty(description = "Enable debug logging to console", restart = false)
public boolean logging;
@Override
public void reset() {
super.reset();
this.logging = true;
}
...
Dart example
import 'package:appfigurateflutter/appfigurateflutter.dart';
public class Configuration extends APLNativeConfiguration {
bool get logging => nativeBool('logging');
...
JavaScript example
import {
NativeModules,
} from 'react-native';
const {Appfigurate} = NativeModules;
...
let logging = await Appfigurate.nativeValue("logging"); // true or false
Remote properties
Remote Switch 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 boolean property to be changed locally in Appfigurate using a switch. 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
@RemoteBoolProperty(remoteKey, description)
var propertyName: Bool
Swift example
import AppfigurateLibrary
@objcMembers class Configuration: APLConfiguration {
@RemoteBoolProperty(remoteKey: "alwaysDarkMode", description: "Force dark mode to be always set")
var alwaysDarkMode: Bool
override func reset() {
alwaysDarkMode = false
}
...
@RemoteBooleanProperty(remoteKey, description)
var propertyName = false
Kotlin example
import nz.co.electricbolt.appfiguratelibrary.Configuration
import nz.co.electricbolt.appfiguratelibrary.annotations.RemoteBooleanProperty
public class AppConfiguration : Configuration() {
@RemoteBooleanProperty(remoteKey = "alwaysDarkMode", description = "Force dark mode to be always set")
var alwaysDarkMode = false
override fun reset() {
super.reset()
alwaysDarkMode = true
}
...
Java prototype
@RemoteBooleanProperty(remoteKey, description)
public boolean propertyName;
Java example
import nz.co.electricbolt.appfiguratelibrary.Configuration;
import nz.co.electricbolt.appfiguratelibrary.annotations.RemoteBooleanProperty;
public class AppConfiguration extends Configuration {
@RemoteBooleanProperty(remoteKey = "alwaysDarkMode", description = "Force dark mode to be always set")
public boolean alwaysDarkMode;
@Override
public void reset() {
super.reset();
this.alwaysDarkMode = true;
}
...
Dart example
import 'package:appfigurateflutter/appfigurateflutter.dart';
public class Configuration extends APLNativeConfiguration {
bool get alwaysDarkMode => nativeBool('alwaysDarkMode');
...
JavaScript example
import {
NativeModules,
} from 'react-native';
const {Appfigurate} = NativeModules;
...
let alwaysDarkMode = await Appfigurate.nativeValue("alwaysDarkMode"); // true or false