Environment variables
  • 05 Jan 2024
  • 2 Minutes to read
  • Contributors
  • Dark

Environment variables

  • Dark

Article summary

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["<Key>"] ! = nil { 
        // Do something 

For more information on Swift's ProcessInfo class, please refer to Apple's official documentation.

How to Create Environment Variables


  1. Click [Environment Variables] on the left sidebar

  2. Click the [iOS] tab

  3. Click [Create Environment Variables] and add the required data.


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]


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]

  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.

    Description of commonly used keys and values:

    • appPackage (Required)

      • Package name

      • Example value:


    • appActivity (Required)

      • Activity name

      • Example value:


    • optionalIntentArguments (Optional)

      Example 1optionalIntentArguments--es API_URL example.com
      Example 2optionalIntentArguments--el USER_ID 127
  5. Click [Create]

How to edit and delete environment variables

You can delete and edit environment variables on the Environment Variable List Page.


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.

  3. Select the environment variable you want to use.

  4. Click [Select].


  • There is no upper limit to the number of environment variables that you can have.

Was this article helpful?

What's Next
Changing your password will log you out immediately. Use the new password to log back in.
First name must have atleast 2 characters. Numbers and special characters are not allowed.
Last name must have atleast 1 characters. Numbers and special characters are not allowed.
Enter a valid email
Enter a valid password
Your profile has been successfully updated.