Multiple app-store apps from one project, slightly different config (ionic-v4/capacitor)

I’ve found this question posted in some form across multiple versions of ionic*, but nothing recent, and nothing in terms of ionic/v4/capacitor - so that’s where I’m going with this:

I have one (ionic v3) codebase that gets published out to mulitple app-store “apps”. The only thing that changes between the published app is some simple config (think, company_id, splash screens, etc…) and the app store IDs/names etc… In my existing V3 project I accomplish this with a bunch of ruby scripts that modify various cordova/ionic config files (config.xml, ionic.config.json, etc, etc) before launching any ionic serve/emulate/build scripts. This works, but generally it’s a beast to deal with. I’m hoping to do better while migrating to ionic v4.

The ionic v4 docs on the subject (Configuration | Ionic Documentation) suggest creating multiple ionic “apps” inside the apps/ folder of my repo. This seems counterintuitive given my setup above. It leaves me wondering if there’s a way I can set up my repo such that it’s single codebase ionic app, that simply pulls in separate configs at build time.

Slightly related - I read somewhere (possibly from that capacitor expects us to check in the generated xcode/java code bases after they have been generated. This also doesn’t seem ideal since I’m generating multiple apps from the same codebase. Is this expectation true? How can I handle this new expectation in this multi-tenant repo?


I have recently migrated similar group of apps from expo to capacitorjs. In expo this was pretty straightforward because of the

  • Dynamic app config (something planned in capacitor v3 I think)
  • App icons/splash were mentioned in the same dynamic config and were auto-generated for each target

So by using a single environment variable, the apps’ name icons etc could be changes.