EAS Build for iOS schemas and Android product flavors


Is it possible to specify which ios schema or android product flavor to build using expos new EAS build? I’d like to run this in my local terminal as a package.json script command. Alternatively could something like this could be done in Circle CI?



Yes, you can specify that in eas.json Configuration with eas.json - Expo Documentation

  • for ios schema
  • for android gradleCommand

If you want to specify that from the command line, you will need to create separate profiles in eas.json and run builds with --profile flag. By default release profile is used.
eas build --profile profile1

Thanks wkozyra.

I have a scheme called UAT, but when i run eas build, i get an error saying “Error: scheme ‘UAT’ does not exist”, even though it does and it is also defined in the eas.json :slight_smile:

       "uat": {
         "workflow": "generic",
         "releaseChannel": "uat",
         "scheme": "UAT"

Is there any way to debug this? Is there something I am missing here?



can you show the output of xcodebuild -list in ios dir ?

Command line invocation:
    /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -list

User defaults from command line:
    IDEPackageSupportUseBuiltinSCM = YES

Information about project "Payright":

    Build Configurations:

    If no build configuration is specified and -scheme is not passed then "Release" is used.


I also run these package.json commands locally to run the build:

"ios:google-setup:uat": "cp './ios/Payright/Firebase/UAT/GoogleService-Info.plist' './ios/Payright'",
"ios:uat:build": "yarn ios:google-setup:uat && env-cmd --file .env.uat eas build --platform ios --non-interactive --profile uat",

Add Podfile has this:

project 'Payright',
  'DEV.Debug' => :debug,
  'DEV.Release' => :release, 
  'UAT.Debug' => :debug,
  'UAT.Release' => :release, 
  'Prod.Debug' => :debug,
  'Prod.Release' => :release

Is the error displayed in eas-cli or in build logs?

  • If in cli please include the entire error and some logs before it with env DEBUG=*
  • If in build logs please send link to the build or account name of the owner/organization (I don’t see any builds for praveen_payright account)

If the error happens on the EAS builder then one issue I have seen before similar to this was caused by canse insetivity of macos system, If that is the case git config core.ignorecase false before build should fix that.

Tried this: git config core.ignorecase false

There are no builds yet so only logs i have are from the eas cli using debug:

customer-app % yarn ios:uat:build
yarn run v1.22.5
$ yarn ios:google-setup:uat && env-cmd --file .env.uat eas build --platform ios --profile uat
$ cp './ios/Payright/Firebase/UAT/GoogleService-Info.plist' './ios/Payright'
  @oclif/config reading core plugin /usr/local/lib/node_modules/eas-cli +0ms
  @oclif/config loadJSON /usr/local/lib/node_modules/eas-cli/package.json +0ms
  @oclif/config loadJSON /usr/local/lib/node_modules/eas-cli/oclif.manifest.json +2ms
  @oclif/config:eas-cli using manifest from /usr/local/lib/node_modules/eas-cli/oclif.manifest.json +0ms
  @oclif/config reading user plugins pjson /Users/praveenjayarajan/.local/share/eas-cli/package.json +0ms
  @oclif/config loadJSON /Users/praveenjayarajan/.local/share/eas-cli/package.json +2ms
  @oclif/config loading plugins [ '@oclif/plugin-help', '@expo/plugin-warn-if-update-available' ] +1ms
  @oclif/config reading core plugin /usr/local/lib/node_modules/eas-cli/node_modules/@oclif/plugin-help +0ms
  @oclif/config loadJSON /usr/local/lib/node_modules/eas-cli/node_modules/@oclif/plugin-help/package.json +1ms
  @oclif/config reading core plugin /usr/local/lib/node_modules/eas-cli/node_modules/@expo/plugin-warn-if-update-available +0ms
  @oclif/config loadJSON /usr/local/lib/node_modules/eas-cli/node_modules/@expo/plugin-warn-if-update-available/package.json +1ms
  @oclif/config loadJSON /usr/local/lib/node_modules/eas-cli/node_modules/@oclif/plugin-help/oclif.manifest.json +0ms
  @oclif/config loadJSON /usr/local/lib/node_modules/eas-cli/node_modules/@expo/plugin-warn-if-update-available/oclif.manifest.json +1ms
  @oclif/config:@oclif/plugin-help using manifest from /usr/local/lib/node_modules/eas-cli/node_modules/@oclif/plugin-help/oclif.manifest.json +0ms
  @oclif/config:@expo/plugin-warn-if-update-available using manifest from /usr/local/lib/node_modules/eas-cli/node_modules/@expo/plugin-warn-if-update-available/oclif.manifest.json +0ms
  @oclif/config config done +3ms
  @oclif/config start init hook +1ms
  eas:@expo/plugin-warn-if-update-available:hooks:init start /usr/local/lib/node_modules/eas-cli/node_modules/@expo/plugin-warn-if-update-available/lib/hooks/init/check-update +0ms
  eas:@expo/plugin-warn-if-update-available:hooks:init done +17ms
  @oclif/config init hook done +17ms
  eas init version: @oclif/command@1.8.0 argv: [ 'build', '--platform', 'ios', '--profile', 'uat' ] +0ms
  @oclif/config runCommand build [ '--platform', 'ios', '--profile', 'uat' ] +4ms
  @oclif/config:eas-cli require /usr/local/lib/node_modules/eas-cli/build/commands/build/index.js +28ms
  @oclif/config start prerun hook +824ms
  @oclif/config prerun hook done +1ms
  eas:build init version: @oclif/command@1.8.0 argv: [ '--platform', 'ios', '--profile', 'uat' ] +0ms
  babel program.body[0] ImportDeclaration: enter +0ms
  babel program.body[0] ImportDeclaration: Recursing into... +0ms
  babel program.body[0].source StringLiteral: enter +0ms
  babel program.body[0].source StringLiteral: Recursing into... +0ms
  babel program.body[0].source StringLiteral: exit +0ms
  babel program.body[0] ImportDeclaration: exit +0ms
  babel program.body[1] VariableDeclaration: enter +0ms
  babel program.body[1] VariableDeclaration: Recursing into... +1ms
  babel program.body[1].declarations[0] VariableDeclarator: enter +0ms
  babel program.body[1].declarations[0] VariableDeclarator: Recursing into... +0ms
  babel program.body[1].declarations[0].id ObjectPattern: enter +0ms
  babel program.body[1].declarations[0].id ObjectPattern: Recursing into... +0ms
  babel program.body[1].declarations[0].id.properties[0] ObjectProperty: enter +0ms
  babel program.body[1].declarations[0].id.properties[0] ObjectProperty: Recursing into... +0ms
  babel program.body[1].declarations[0].id.properties[0].key Identifier: enter +0ms
  babel program.body[1].declarations[0].id.properties[0].key Identifier: Recursing into... +0ms
  babel program.body[1].declarations[0].id.properties[0].key Identifier: exit 

  babel program.body[2] ExpressionStatement: exit +0ms
✔ Linked to project @payright/payright
Error: scheme 'UAT' does not exist
    at Object.getApplicationTargetForSchemeAsync (/usr/local/lib/node_modules/eas-cli/node_modules/@expo/config-plugins/build/ios/BuildScheme.js:19:15)
    at Object.prepareIosBuildAsync (/usr/local/lib/node_modules/eas-cli/build/build/ios/build.js:38:77)
    at async startBuildsAsync (/usr/local/lib/node_modules/eas-cli/build/build/create.js:45:39)
    at async Object.buildAsync (/usr/local/lib/node_modules/eas-cli/build/build/create.js:21:29)
    at async Build.run (/usr/local/lib/node_modules/eas-cli/build/commands/build/index.js:72:13)
    at async Build._run (/usr/local/lib/node_modules/eas-cli/node_modules/@oclif/command/lib/command.js:43:20)
    at async Config.runCommand (/usr/local/lib/node_modules/eas-cli/node_modules/@oclif/config/lib/config.js:173:24)
    at async Main.run (/usr/local/lib/node_modules/eas-cli/node_modules/@oclif/command/lib/main.js:27:9)
    at async Main._run (/usr/local/lib/node_modules/eas-cli/node_modules/@oclif/command/lib/command.js:43:20)
error Command failed with exit code 1.

So if I remove the scheme from eas.json then I get this error:

All credentials are ready to build @payright/payright (com.payright.customer.uat)

Error: Bundle identifier is not configured correctly in your Xcode project. Please run "eas build:configure" to configure it.
    at Object.validateAndSyncProjectConfigurationAsync (/usr/local/lib/node_modules/eas-cli/build/build/ios/configure.js:39:23)
    at Object.ensureProjectConfiguredAsync (/usr/local/lib/node_modules/eas-cli/build/build/ios/build.js:58:31)
    at withAnalyticsAsync.successEvent (/usr/local/lib/node_modules/eas-cli/build/build/build.js:26:60)
    at withAnalyticsAsync (/usr/local/lib/node_modules/eas-cli/build/build/build.js:119:30)
    at Object.prepareBuildRequestForPlatformAsync (/usr/local/lib/node_modules/eas-cli/build/build/build.js:26:15)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at async Object.prepareIosBuildAsync (/usr/local/lib/node_modules/eas-cli/build/build/ios/build.js:50:12)
    at async startBuildsAsync (/usr/local/lib/node_modules/eas-cli/build/build/create.js:45:39)
    at async Object.buildAsync (/usr/local/lib/node_modules/eas-cli/build/build/create.js:21:29)
    at async Build.run (/usr/local/lib/node_modules/eas-cli/build/commands/build/index.js:72:13)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

My Info.plist


I have defined the bundleIdentifier in app.json as com.payright.customer.uat

After running eas:build:configure and choosing the correct bundleIdentifier, I can create a build only if i remove the “scheme” from eas.json. But then the cli does not prompt me to select a scheme. So I have got a build for the wrong scheme.

Build id is: 8a4f69e2-4c65-45a5-afb7-f0f669064fd8

For the original error

Error: Bundle identifier is not configured correctly in your Xcode project.

We don’t handle all the cases for xcode projects, so this validation is failing because we are not aware of how CFBundleIdentifier is constructed and we just read value of PRODUCT_BUNDLE_IDENTIFIER. This is sth we plan to improve in the future.

I’m assume that you are using different bundle identifiers for different schemes, or at least the project is ready to support that?

1 Like

From what I see you should still be prompted for scheme in the second case unless you have --non-interactive set, but either way, it’s not the core of the problem.

@wkozyra thank you!

So, the issue was that i did not make the schemes “shared” in xcode, and I also removed the “BUNDLE_ID_SUFFIX” for CFBundleIdentifier, and added that experimental flag as well.

Really appreciate your help on this one.

I just had one last question if you don’t mind.

If the app.json specifies the version, versionCode, & buildNumber, are we required to manually update these values in app/build.gradle and Info.plist with this information, or will it be done by the EAS build service?

Thanks again :pray:t4:


For android you need to handle it yourself, only runtimeVersion/sdkVersion is synced during build
For ios

  • if you use autoincrement option it will handle it for you
  • otherwise you also need to do that manually

an alternative could be to run eject, but depending on the structure of your project it might not work (eject is support mostly for project that closely resemble managed workflow template)

the experimental flag should not be necessary If you remove BUNDLE_ID_SUFFIX and run configure (remove experimental flag before running configure)

Ah right perfect thanks.

I’m running into another issue now on build.

Would you be able to assist on this?

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