EAS Submit doesn't use process.env variables

Hello,

I’m using EAS to build and submit my application on several store (IOS / Android).
So, in my eas.json file I made 3 différent profile with different app name / slug and bundle :

{
  "build": {
    "base": { ... },
    "preproduction": {
      "extends": "base",
      "env": {
        "APP_NAME": "App",
        "APP_SLUG": "App",
        "IOS_BUNDLE_NAME": "com.app.mobileapp",
        "ANDROID_BUNDLE_NAME": "com.app.mobileapp"
      }
    },
    "preproduction-internal-preprod": {
      "extends": "base",
      "env": {
        "APP_NAME": "App-PPROD",
        "APP_SLUG": "App-PPROD",
        "IOS_BUNDLE_NAME": "com.firm.app.preprod",
        "ANDROID_BUNDLE_NAME": "com.firm.app.preprod"
      }
    },
    "preproduction-internal-dev": {
      "extends": "base",
      "env": {
        "APP_NAME": "App-DEV",
        "APP_SLUG": "App-DEV",
        "IOS_BUNDLE_NAME": "com.firm.app.dev",
        "ANDROID_BUNDLE_NAME": "com.firm.app.dev"
      }
    }
  },
  "submit": {
    "preproduction": {
      "android": {
        "serviceAccountKeyPath": "./key.json",
        "releaseStatus": "completed",
        "track": "internal"
      },
      "ios": {
        "appleId": "...",
        "ascAppId": "...",
        "appleTeamId": "..."
      }
    },
    "preproduction-internal-preprod": {
      "android": {
        "serviceAccountKeyPath": "./key.json",
        "releaseStatus": "completed",
        "track": "internal"
      },
      "ios": {
        "appleId": "...",
        "ascAppId": "...",
        "appleTeamId": "..."
      }
    },
    "preproduction-internal-dev": {
      "android": {
        "serviceAccountKeyPath": "./key.json",
        "releaseStatus": "completed",
        "track": "internal"
      },
      "ios": {
        "appleId": "...",
        "ascAppId": "...",
        "appleTeamId": "..."
      }
    }
  }
}

In my app.config.json file I get the informations with process.env :

name: process.env.APP_NAME || 'App',
slug: process.env.APP_SLUG || 'App',

When i execute my build with this command : eas build -p ios --profile preproduction-internal-dev --non-interactive, there is no problem, the build works and get the env variables from eas.json file.
Same with my others profiles.
But when I submit my application with this command : eas submit -p ios --profile preproduction-internal-dev
The app.config.json doesn’t took the env variables from eas.json and place my default values.

Is there a way to get the env variable of the eas.json file when submiting the build ?

Thanks

if you use the --auto-submit flag then the env from your profile will be used here, otherwise you will need to set those env vars manually

eas build -p ios --profile preproduction-internal-dev --auto-submit

I tried to use --auto-submit. This seems to work, but when the command submit the build I got this error :

I’m on windows, I put the EXPO_APPLE_APP_SPECIFIC_PASSWORD to my variables, but I don’t know what is FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD variable.

Can you explain it to me ?

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.