# Configure app

The Configure app screen displays the current configuration received from your app.

<div align="left"><figure><img src="https://1008176080-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fw1fcw3dvtSrfUh3YtO9Z%2Fuploads%2FBxSxN3sspmnC07TrrkPE%2FSimulator%20Screenshot%20-%20iPhone%20SE%20(2nd%20generation)%20-%202024-07-25%20at%2021.16.37.png?alt=media&#x26;token=8c71aefb-cc07-4504-b4f6-e6bffd71e5ae" alt="" width="375"><figcaption></figcaption></figure></div>

## Header

The app's embedded library version number is displayed. If the library version is less than the Appfigurate version, a warning icon is displayed. If the library version is equal to the Appfigurate version, then a green tick is displayed.

If the app being configured is a debug build (the `APLConfiguration` (iOS/watchOS) or `nz.co.electricbolt.appfiguratelibrary.Configuration` (Android) subclass method [`allowInvalidSignatures`](https://www.electricbolt.co.nz/api/Classes/APLConfiguration.html#/c:objc\(cs\)APLConfiguration\(im\)allowInvalidSignatures) returned true), then the text `Debug build - App allows invalid signature` is displayed with a warning icon.&#x20;

`Signature is valid` is displayed with a green tick if the correct private key was used to sign the configuration payload.

## Configurable properties

The configurable properties in the app are displayed on screen and are modifiable:

* [Boolean properties](https://docs.electricbolt.co.nz/configuration-subclasses/supported-property-types/boolean) are represented by a [switch](https://docs.electricbolt.co.nz/configuration-subclasses/supported-property-types/boolean#switch-ui).
* [Integer properties](https://docs.electricbolt.co.nz/configuration-subclasses/supported-property-types/integer) are represented by a [slider](https://docs.electricbolt.co.nz/configuration-subclasses/supported-property-types/integer#slider-ui), [text field](https://docs.electricbolt.co.nz/configuration-subclasses/supported-property-types/integer#editable-ui), a [list](https://docs.electricbolt.co.nz/configuration-subclasses/supported-property-types/integer#list-ui) or an [editable list](https://docs.electricbolt.co.nz/configuration-subclasses/supported-property-types/integer#editable-list-ui) with custom items.
* [Float ](https://docs.electricbolt.co.nz/configuration-subclasses/supported-property-types/float)and [Double properties](https://docs.electricbolt.co.nz/configuration-subclasses/supported-property-types/double) are represented by a [slider](https://docs.electricbolt.co.nz/configuration-subclasses/supported-property-types/double#slider-ui), [text field](https://docs.electricbolt.co.nz/configuration-subclasses/supported-property-types/double#editable-ui), a [list](https://docs.electricbolt.co.nz/configuration-subclasses/supported-property-types/double#list-ui) or an [editable list](https://docs.electricbolt.co.nz/configuration-subclasses/supported-property-types/double#editable-list-ui) with custom items.
* [String properties](https://docs.electricbolt.co.nz/configuration-subclasses/supported-property-types/plain-string) are represented by a [text field](https://docs.electricbolt.co.nz/configuration-subclasses/supported-property-types/plain-string#editable-ui), a [list](https://docs.electricbolt.co.nz/configuration-subclasses/supported-property-types/plain-string#list-ui) or an [editable list](https://docs.electricbolt.co.nz/configuration-subclasses/supported-property-types/plain-string#editable-list-ui) with custom items.
* [Encrypted string properties](https://docs.electricbolt.co.nz/configuration-subclasses/supported-property-types/encrypted-string) are represented by an [editable list](https://docs.electricbolt.co.nz/configuration-subclasses/supported-property-types/encrypted-string#editable-list-ui) with custom items.

### Property options

If the app is compiled as a release build, any [encrypted string](https://docs.electricbolt.co.nz/configuration-subclasses/supported-property-types/encrypted-string) properties are displayed with an encrypted <img src="https://1008176080-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fw1fcw3dvtSrfUh3YtO9Z%2Fuploads%2FwUupL0Jtkc21zxHC1MrF%2FENCRYPTED.png?alt=media&#x26;token=089204f2-ce4d-405b-a8d7-74a8ead733b9" alt="" data-size="line"> tag.

Any properties that require the app to be restarted after being changed are displayed with a restart  <img src="https://1008176080-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fw1fcw3dvtSrfUh3YtO9Z%2Fuploads%2FUd39bJjzIAw9WQXGcEOX%2FRESTART.png?alt=media&#x26;token=cb219958-5f91-4f79-ac73-e20c5cb578ee" alt="" data-size="line"> tag.

## List

Tapping on a configurable property that is a list, or an editable list with custom items shows the following screen:

<div align="left"><figure><img src="https://1008176080-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fw1fcw3dvtSrfUh3YtO9Z%2Fuploads%2FNt2EZ9ZwWApziPqKY9Ya%2FSimulator%20Screenshot%20-%20iPhone%20SE%20(2nd%20generation)%20-%202024-07-25%20at%2021.17.03.png?alt=media&#x26;token=bb97fc5a-43d3-4d39-b6d5-d576543ab5da" alt="" width="375"><figcaption></figcaption></figure></div>

The currently selected list item is displayed with a tick ✓. To select a new item, tap any item in the list; the list screen will be dismissed automatically. Long press an item to copy the value onto the iOS or Android clipboard.

## Editable list

If the list is editable, then the `Add custom item` button is displayed. Tapping the button will display the following screen:

<div align="left"><figure><img src="https://1008176080-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fw1fcw3dvtSrfUh3YtO9Z%2Fuploads%2FWQtydbnTcbQUDW4JhVCv%2FSimulator%20Screenshot%20-%20iPhone%20SE%20(2nd%20generation)%20-%202024-07-25%20at%2021.17.30.png?alt=media&#x26;token=5d846f3f-13ef-4e8e-8bf8-bd0dc72fc286" alt="" width="375"><figcaption></figcaption></figure></div>

{% hint style="info" %}
If there is text in the iOS or Android clipboard, then the clipboard contents are automatically pasted into the value field. The first numeric range is highlighted automatically.
{% endhint %}

Enter a name and value. The value must conform to the property's minimum and maximum values (if applicable) and regular expression (if applicable). If the value does not conform, the field will be displayed bold red, and the `Add` button will be disabled.

On the list screen, custom items are displayed below predefined items hardcoded in your app:

<div align="left"><figure><img src="https://1008176080-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fw1fcw3dvtSrfUh3YtO9Z%2Fuploads%2FMRp7OikT9NchqwuDDzGc%2FSimulator%20Screenshot%20-%20iPhone%20SE%20(2nd%20generation)%20-%202024-07-25%20at%2021.17.39.png?alt=media&#x26;token=06db91b5-3d53-488f-9509-8939f325e1d3" alt="" width="375"><figcaption></figcaption></figure></div>

## Applying configuration

When you are ready to apply the selected configuration to your app, tap the `Apply ˅` toolbar button. Your app will be launched, and it's configuration updated.

### Apply options

Long press the `Apply ˅` toolbar button or drag from the right edge of the screen towards the left to open the Apply menu.

<div align="left"><figure><img src="https://1008176080-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fw1fcw3dvtSrfUh3YtO9Z%2Fuploads%2FpLHV4IPaqoY3Q6wdasI9%2FSimulator%20Screenshot%20-%20iPhone%20SE%20(2nd%20generation)%20-%202024-07-25%20at%2021.22.04.png?alt=media&#x26;token=020d21b3-a258-47e1-8d08-ea67b0ad1376" alt="" width="375"><figcaption></figcaption></figure></div>

The `Apply to this device` menu item performs identically to tapping the `Apply ˅` toolbar button.

The `Apply invalid to this device` menu item, generates a random private key, which is then used to sign the configuration payload. Your app will then be launched. If your app's `APLConfiguration` (iOS/watchOS) or `nz.co.electricbolt.appfiguratelibrary.Configuration` (Android) subclass [`allowInvalidSignatures`](https://www.electricbolt.co.nz/api/Classes/APLConfiguration.html#/c:objc\(cs\)APLConfiguration\(im\)allowInvalidSignatures) method returns true, then the app's configuration will be updated. If the method returns false, then the configuration will not be updated. This can be useful in testing your apps release build to ensure it only accepts valid signatures.

The `Reset this device` menu item resets your app's configuration back to factory defaults (the values specified in your `APLConfiguration` (iOS/watchOS) or `nz.co.electricbolt.appfiguratelibrary.Configuration` (Android) subclass [`reset`](https://www.electricbolt.co.nz/api/Classes/APLConfiguration.html#/c:objc\(cs\)APLConfiguration\(im\)reset) method).
