I’d like to have 3 versions of our app: development, staging, and production. I’m able to use EAS Build profiles to setup the build with different environment variables and release channels, which is great. But I’d also like to be able to install the different versions on the same device at the same time.
I have been researching this and am unsure what the best practice would be for a bare workflow. I found this discussion for the managed workflow:
I also found this git commit showing that you can’t set the bundle identifier in app.config.js anymore:
You need to create 3 separate xcode targets and 3 separate schemes (one scheme per target). In Xcode you can specify different bundle identifiers for each target and in eas.json build profile you can define which scheme should be built.
Next I was getting ** ARCHIVE FAILED ** in the FastLane build. The original “Dev” target worked. This lead me to see that pods were not being created, so I modified the podfile to have a section for each target (as far as I can see, nothing in Xcode would do this automatically). Now the iOS build process seems to be working.
Now I am working on doing the same with Android. I have setup 3 productFlavor’s with 3 different applicationId’s. This is working locally. To get EAS Build to do this, it sounds like I need to override the gradleCommand (as shown here: Adding multiple targets and product flavors - #10 by wodin).
Would that just be :app:assembleStageRelease, for example? I will give it a try…
Reopening this, as I am now working on using this setup with EAS Submit (just for submitting the production version). Starting with iOS, when I try to submit (with eas submit -p ios --profile production --latest) I get the error message:
Multiple schemes and targets found in Xcode project, bundle identifier couldn't be resolved.