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?
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?
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)
Hi There! Running into the same issue. Can you please walk thru the exact solution/share your eas.json/app.config.json? @staxy
We have multiple app.environent_name.json files with different bundle identifiers and app.config.js that select the config file to use base on APP_ENV variable like so:
assuming that this is managed project, you need to add env: { APP_ENV: "environent_name" } to build profiles in eas.json. Otherwise app.json resolved in cli and on the builder is different.
Hey, I got the same issue when trying to configure the same thing as he didnāt mentioned above. And I am getting this error mesasge Could not find target āXXXXā in project.pbxproj