There are two types of variables available that you can use inside a Draftbit app.
Variables that can be set and utilized across your entire application. For example, an API Key or a Client ID for one of your REST Service.
Each time your app restarts, this type of variable will reset to its default value.
Variables that allow you to store data on your app users' devices. For example, when implementing auth with your REST API service, the auth token obtained back from the service is usually stored in this type of variable.
Each time your app restarts, this type of variable will not reset to the default value and will use the last value stored in it.
- To add variables, open the Variables modal from the top menu.
This will open the modal below:
In an App Variable and a Device Variable, all JSON primitive types of values can be stored.
In JSON, values must be one of the following data types:
- JSON object
Updated 19 days ago