Int is platform dependent, 32-bit signed values on 32-bit CPUs (Apple Watch; arm64_32) and 64-bit signed values on 64-bit CPUs (iPhone, iPad; arm64).
The default value of a Int is 0. You can change the default value of the property by assigning a new value in an overridden method.
NSInteger is platform dependent, 32-bit signed values on 32-bit CPUs (Apple Watch arm64_32) and 64-bit signed values on 64-bit CPUs (iPhone, iPad arm64).
The default value of a NSInteger is 0. You can change the default value of the property by assigning a new value in an overridden method.
NSInteger properties should be declared in your subclass header file as follows:
The default value of an Int is 0. You can change the default value of the property by assigning a new value in an overridden method.
The default value of an int is 0. You can 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.
React Native always converts the underlying Integer to a JavaScript Number - you should be aware of .
Local properties
Slider UI
Allows an integer property to be changed in Appfigurate using a slider between minimum and maximum values.
Swift prototype
@IntPropertySlider(min, max, icon, description, restart)
var propertyName: Int
You can customize the minimum and maximum images using the parameter. If restart is true, then the app will be restarted if the property value changes.
@IntPropertySlider(description, minValue, maxValue, sliderIcon, restart)
int propertyName;
Java example
import nz.co.electricbolt.appfiguratelibrary.Configuration;
import nz.co.electricbolt.appfiguratelibrary.annotations.IntPropertySlider;
import nz.co.electricbolt.appfiguratelibrary.annotations.IconSlider;
public class AppConfiguration extends Configuration {
@IntPropertySlider(description = "Limit volume level", minValue = 50, maxValue = 100, sliderIcon = IconSlider.IconSliderVolume, restart = false)
public int volumeRange;
@Override
public void reset() {
super.reset();
this.volumeRange = 75;
}
...
Dart prototype
int get propertyName => nativeInt('propertyName');
Dart example
import 'package:appfigurateflutter/appfigurateflutter.dart';
public class Configuration extends APLNativeConfiguration {
int get volumeRange => nativeInt('volumeRange');
...
JavaScript example
import {
NativeModules,
} from 'react-native';
const {Appfigurate} = NativeModules;
...
let volumeRange = await Appfigurate.nativeValue("volumeRange"); // Number
Editable UI
Allows an integer property to be changed in Appfigurate using a text field between minimum and maximum values, and an optional regular expression validating input.
Swift prototype
@IntPropertyEdit(min, max, regex, description, restart)
var propertyName: Int
If restart is true, then the app will be restarted if the property value changes.
Swift example
import AppfigurateLibrary
@objcMembers class Configuration: APLConfiguration {
@IntPropertyEdit(min: 1, max: 5, regex: "", description: "Maximum number of game levels", restart: false)
var gameLevels: Int
override func reset() {
gameLevels = 3
}
...
@IntPropertyEdit(description, minValue, maxValue, regularExpression, restart)
var propertyName = 0
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.IntPropertyEdit
class AppConfiguration : Configuration() {
@IntPropertyEdit(description = "Maximum number of game levels", minValue = 1, maxValue = 5, restart = false)
var gameLevels = 0
override fun reset() {
super.reset()
gameLevels = 3
}
...
Java prototype
@IntPropertyEdit(description, minValue, maxValue, regularExpression, restart)
int 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.IntPropertyEdit;
public class AppConfiguration extends Configuration {
@IntPropertyEdit(description = "Maximum number of game levels", minValue = 1, maxValue = 5, restart = false)
public int gameLevels;
@Override
public void reset() {
super.reset();
this.gameLevels = 3;
}
...
Dart prototype
int get propertyName => nativeInt('propertyName');
Dart example
Dimport 'package:appfigurateflutter/appfigurateflutter.dart';
public class Configuration extends APLNativeConfiguration {
int get gameLevels => nativeInt('gameLevels');
...
JavaScript example
import {
NativeModules,
} from 'react-native';
const {Appfigurate} = NativeModules;
...
let gameLevels = await Appfigurate.nativeValue("gameLevels"); // Number
List UI
Allows an integer property to be changed in Appfigurate by allowing the user to select from a predefined list of valid choices.
Swift prototype
@IntPropertyList(description, restart, values)
var propertyName: Int
If restart is true, then the app will be restarted if the property value changes.
@IntPropertyList(description, keys, values, restart)
int propertyName;
If restart is true, then the app will be restarted if the property value changes.
Java example
import nz.co.electricbolt.appfiguratelibrary.Configuration;java
import nz.co.electricbolt.appfiguratelibrary.annotations.IntPropertyList;
public class AppConfiguration extends Configuration {
@IntPropertyList(description = "Quality rating", keys = {"Low", "Average", "Excellent"}, values = {10, 50, 95}, restart = false)
public int rating;
@Override
public void reset() {
super.reset();
this.rating = 10;
}
...
Dart prototype
int get propertyName => nativeInt('propertyName');
Dart example
import 'package:appfigurateflutter/appfigurateflutter.dart';
public class Configuration extends APLNativeConfiguration {
int get rating => nativeInt('rating');
...
JavaScript example
import {
NativeModules,
} from 'react-native';
const {Appfigurate} = NativeModules;
...
let rating = await Appfigurate.nativeValue("rating"); // Number
Editable List UI
Allows an integer 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 between minimum and maximum values, and an optional regular expression validating input.
Swift prototype
@IntPropertyListEdit(min, max, regex, description, restart, values)
var propertyName: Int
If restart is true, then the app will be restarted if the property value changes.
Swift example
import AppfigurateLibrary
@objcMembers class Configuration: APLConfiguration {
@IntPropertyListEdit(min: 0, max: 365, regex: "^(0?[0-9]?[0-9]|[1-2][0-9][0-9]|3[0-5][0-9]|36[0-5])$", description: "Duration in days emails are available", restart: false, values: ["7 days": 7, "1 month": 30, "1 Year": 365])
var availablityDuration: Int
override func reset() {
volumeRange = 7
}
...Swift
@IntPropertyListEdit(description, regularExpression, minValue, maxValue, keys, values, restart)
Int propertyName;
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.IntPropertyListEdit
class AppConfiguration : Configuration() {
@IntPropertyListEdit(description = "Duration in days emails are available", minValue = 0, maxValue = 365, regularExpression = "^(0?[0-9]?[0-9]|[1-2][0-9][0-9]|3[0-5][0-9]|36[0-5])$", keys = ["7 days", "1 month", "1 Year"], values = [7, 30, 365], restart = false)
var availablityDuration = 0
override fun reset() {
super.reset()
availabilityDuration = 7
}
...
Java prototype
@IntPropertyListEdit(description, regularExpression, minValue, maxValue, keys, values, restart)
int 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.IntPropertyListEdit;
public class AppConfiguration extends Configuration {
@IntPropertyListEdit(description = "Duration in days emails are available", minValue = 0, maxValue = 365, regularExpression = "^(0?[0-9]?[0-9]|[1-2][0-9][0-9]|3[0-5][0-9]|36[0-5])$", keys = {"7 days", "1 month", "1 Year"}, values = {7, 30, 365}, restart = false)
public int availablityDuration;
@Override
public void reset() {
super.reset();
this.availabilityDuration = 7;
}
...
Dart prototype
int get propertyName => nativeInt('propertyName');
Dart example
import 'package:appfigurateflutter/appfigurateflutter.dart';
public class Configuration extends APLNativeConfiguration {
int get availabilityDuration => nativeInt('availabilityDuration');
...
JavaScript example
import {
NativeModules,
} from 'react-native';
const {Appfigurate} = NativeModules;
...
let availabilityDuration = await Appfigurate.nativeValue("availabilityDuration"); // Number
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.
Swift prototype
@RemoteIntPropertyEdit(remoteKey, description)
var propertyName: Int
Swift example
import AppfigurateLibrary
@objcMembers class Configuration: APLConfiguration {
@RemoteIntPropertyEdit(remoteKey: "bookingDuration", description: "Duration (days) for reservation bookings")
var bookingDuration: Int
override func reset() {
bookingDuration = 180
}
...
@RemoteIntPropertyEdit(remoteKey, description)
var propertyName = 0
Kotlin example
import nz.co.electricbolt.appfiguratelibrary.Configuration
import nz.co.electricbolt.appfiguratelibrary.annotations.RemoteIntPropertyEdit
class AppConfiguration : Configuration() {
@RemoteIntPropertyEdit(remoteKey = "bookingDuration", description = "Duration (days) for reservation bookings")
var bookingDuration = 0
override fun reset() {
super.reset()
bookingDuration = 180
}
...
Java prototype
@RemoteIntPropertyEdit(remoteKey, description)
int propertyName;
Java example
import nz.co.electricbolt.appfiguratelibrary.Configuration;
import nz.co.electricbolt.appfiguratelibrary.annotations.RemoteIntPropertyEdit;
public class AppConfiguration extends Configuration {
@RemoteIntPropertyEdit(remoteKey = "bookingDuration", description = "Duration (days) for reservation bookings")
public int bookingDuration;
@Override
public void reset() {
super.reset();
this.bookingDuration = 180;
}
...
Dart prototype
int get propertyName => nativeInt('propertyName');
Dart example
Dimport 'package:appfigurateflutter/appfigurateflutter.dart';
public class Configuration extends APLNativeConfiguration {
int get bookingDuration => nativeInt('bookingDuration');
...
JavaScript example
import {
NativeModules,
} from 'react-native';
const {Appfigurate} = NativeModules;
...
let bookingDuration = await Appfigurate.nativeValue("bookingDuration"); // Number
You can customize the minimum and maximum images using the parameter. If restart is true, then the app will be restarted if the property value changes.
You can customize the minimum and maximum images using the parameter. If restart is true, then the app will be restarted if the property value changes.
Allows a third party remote configuration provider's integer 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.