Boolean
Last updated
Last updated
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:
@import AppfigurateLibrary;
@interface Configuration : APLConfiguration
@property(nonatomic, assign) BOOL propertyName;
...
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.
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.
Allows a boolean property to be changed in Appfigurate using a switch.
Swift prototype
@BoolProperty(description, restart)
var propertyName: Bool
If restart
is true
, then the app will be restarted if the property value changes.
Swift example
import AppfigurateLibrary
@objcMembers class Configuration: APLConfiguration {
@BoolProperty(description: "Enable debug logging to console", restart: false)
var logging: Bool
override func reset() {
logging = true
}
...
Objective-C prototype
BOOL_PROPERTY(propertyName, description, restart)
If restart
is YES
, then the app will be restarted if the property value changes.
Objective-C example
@import AppfigurateLibrary;
@interface Configuration : APLConfiguration
@property(nonatomic, assign) BOOL logging;
@end
@implementation Configuration
BOOL_PROPERTY(logging, @"Enable debug logging to console", NO);
- (void) reset {
self.logging = YES;
}
...
Kotlin prototype
@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