--- title: "Environment variables" slug: "environment-variables" updated: 2024-01-05T09:22:24Z published: 2024-01-05T09:22:24Z canonical: "help.autify.com/environment-variables" --- > ## Documentation Index > Fetch the complete documentation index at: https://help.autify.com/llms.txt > Use this file to discover all available pages before exploring further. # Environment variables ## What are Environment Variables? **Note: Before using this feature, a developer must define the code that handles boot arguments.** On iOS, *environment variables* refer to boot variables. The behavior of this feature changes depending on the predefined code in the app. After the code is changed, you can use this feature to pass specific values to the app. For example, you can use environment variables to: - Change the server endpoint for each scenario - Change the application state for each scenario ## App Prerequisites To use this feature, the app must be able to handle boot variables. Below is a sample code in Swift. The value of `<Key>` in the sample code must be the same as the Key registered in Autify. ``` #if DEBUG if ProcessInfo.processInfo.environment[""] ! = nil { // Do something } #endif ``` For more information on Swift's ProcessInfo class, please refer to Apple's official documentation. - [ProcessInfo | Apple Developer](https://developer.apple.com/documentation/foundation/processinfo) ## How to Create Environment Variables ### iOS 1. Click [Environment Variables] on the left sidebar ![ev_en.png](https://cdn.document360.io/a099d8a2-cfd2-42ca-9906-68b4a337f4a5/Images/Documentation/ev_en.png?sv=2026-02-06&spr=https&st=2026-11-07T12%3A38%3A33Z&se=2026-11-07T13%3A38%3A33Z&sr=c&sp=r&sig=a3UgeFrYg74tR4yzOSNyn7rOQvydBnyubp0Q3Q8u7ps%3D) 2. Click the **[iOS]** tab 3. Click **[Create Environment Variables]** and add the required data. ![ios_create_EV.png](https://cdn.document360.io/a099d8a2-cfd2-42ca-9906-68b4a337f4a5/Images/Documentation/ios_create_EV.png?sv=2026-02-06&spr=https&st=2026-11-07T12%3A38%3A33Z&se=2026-11-07T13%3A38%3A33Z&sr=c&sp=r&sig=a3UgeFrYg74tR4yzOSNyn7rOQvydBnyubp0Q3Q8u7ps%3D) Let's take a look at what each input item means. - Name - A unique value to identify the environment variable you are creating - Key - Variable name - Value - Variable value - Description (optional) - Description of the environment variable 1. Click **[Create]** ### Android When using environment variables in Android, **you must specify *appPackage* and *appActivity***. 1. Click [Environment Variables] on the left sidebar 2. Click the **[Android]** tab 3. Click **[Create Startup Activity]** ![create_startupActivity_En.png](https://cdn.document360.io/a099d8a2-cfd2-42ca-9906-68b4a337f4a5/Images/Documentation/create_startupActivity_En.png?sv=2026-02-06&spr=https&st=2026-11-07T12%3A38%3A33Z&se=2026-11-07T13%3A38%3A33Z&sr=c&sp=r&sig=a3UgeFrYg74tR4yzOSNyn7rOQvydBnyubp0Q3Q8u7ps%3D) 4. Add the required data ※As mentioned above, **you must specify *appPackage* and *appActivity*** when using environment variables in Android. Please select them in the *Key* section and create each. ![key_en.png](https://cdn.document360.io/a099d8a2-cfd2-42ca-9906-68b4a337f4a5/Images/Documentation/key_en.png?sv=2026-02-06&spr=https&st=2026-11-07T12%3A38%3A33Z&se=2026-11-07T13%3A38%3A33Z&sr=c&sp=r&sig=a3UgeFrYg74tR4yzOSNyn7rOQvydBnyubp0Q3Q8u7ps%3D) Description of commonly used keys and values: - **appPackage (Required)** - Package name - Example value: `com.example.app` - **appActivity (Required)** - Activity name - Example value: `.ExampleActivity` - **optionalIntentArguments (Optional)** | Name | Key | Value | | --- | --- | --- | | Example 1 | optionalIntentArguments | --es API_URL example.com | | Example 2 | optionalIntentArguments | --el USER_ID 127 | - Intent Argument. When using this key, its value must include the option as described in the [*Specification for intent arguments* section in the official documentation](https://developer.android.com/studio/command-line/adb#IntentSpec). - Example values: 5. Click **[Create]** ## How to edit and delete environment variables You can delete and edit environment variables on the Environment Variable List Page. ![EnvironmentVariables_3.png](https://cdn.document360.io/a099d8a2-cfd2-42ca-9906-68b4a337f4a5/Images/Documentation/EnvironmentVariables_3.png?sv=2026-02-06&spr=https&st=2026-11-07T12%3A38%3A33Z&se=2026-11-07T13%3A38%3A33Z&sr=c&sp=r&sig=a3UgeFrYg74tR4yzOSNyn7rOQvydBnyubp0Q3Q8u7ps%3D) ## How to Use Environment Variables in Scenarios You can use environmental variables on the build file selection page in new scenarios, existing scenarios, or when creating a new Step Group. 1. Select the target build file. 2. Select the [Set environment variables] button. ![EnvironmentVariables_4.png](https://cdn.document360.io/a099d8a2-cfd2-42ca-9906-68b4a337f4a5/Images/Documentation/EnvironmentVariables_4.png?sv=2026-02-06&spr=https&st=2026-11-07T12%3A38%3A33Z&se=2026-11-07T13%3A38%3A33Z&sr=c&sp=r&sig=a3UgeFrYg74tR4yzOSNyn7rOQvydBnyubp0Q3Q8u7ps%3D) 3. Select the environment variable you want to use. ![select_variables.png](https://cdn.document360.io/a099d8a2-cfd2-42ca-9906-68b4a337f4a5/Images/Documentation/select_variables.png?sv=2026-02-06&spr=https&st=2026-11-07T12%3A38%3A33Z&se=2026-11-07T13%3A38%3A33Z&sr=c&sp=r&sig=a3UgeFrYg74tR4yzOSNyn7rOQvydBnyubp0Q3Q8u7ps%3D) 4. Click [Select]. ## Others - There is no upper limit to the number of environment variables that you can have.