EAS Build Alternative Bundle Identifiers

I am using EAS build to create different app versions for different environments (production, staging etc) using profiles which is working well. I would now like to use different bundle identifiers to allow different versions to be installed simultaneously. In short, my question is how can I do this?

I am using managed builds and I have tried setting the bundle identifier using ios.bundleIdentifier in app.config.js loaded from an environment variable set in eas.json. At the same time I set the name value to an environment variable. For some reason this is causing the following error during the “Configure Xcode project” build step.

error Could not find target 'XXXXX' in project.pbxproj

Am I doing something wrong or am I on completely the wrong track?

EAS CLI version 0.15, eas build problem - #5 by wkozyra seems to allude to support for multiple bundle identifiers in 0.17.0 but I am not sure what I need to do to take advantage of this.

Thank you for your help

name field is used to generate the target name in native code. I see in your logs that you have env APP_NAME there. Are you also setting that variable in your local environment when calling eas build ?

btw I recommend using Eas secrets for any keys you need to have specified as envs, even if they are embedded in the app

Thank you for your reply. I am not currently setting the variable locally, no. Presumably if I am triggering the build from CI (which I am not currently whilst sorting this problem), I need to set it there too?

Setting the environment variable has changed things but I’m still getting the same error, just now with a more correct name.

The value in name includes spaces and brackets which have been stripped out in the error. Could this causing my current problem?

name in app.config.json needs to be the same in environment where you are calling eas build and in environment on eas builder.
Based on the last build on your account I’m assuming that in CI you are setting XXXXX (Staging Sandbox) and in eas.json XXXXX (Staging Live)

Ah yes, thank you. Seems to be all sorted now. Thank you for your help.