Capacitor Monorepo Questions

Hey there :wave:t3:

first: i’m not a Capictor User yet. The Reason ist that the apps that i’m building currently all use Google Maps and because i only wan’t to use the native SDK’s (not JS) and the Google Maps Plugin is not finished yet, i can’t.

I have done some small Capacitor Projects as Test but i’m not very into yet.

Now my Question: I’m currently developing a new App-System, where i have one App-Code, which i can deploy to unlimited Customer Apps (planned (hopefully) some hundert). Is this even possible with Capacitor? With Cordova i can use Hooks to replace related Stuff (config.xml values like id, name, etc., Icon Splash Screen) before build and then run the cordova Build as Cordova generates the native App Folders by zero again.

As far as i understand Capacitor doesn’t do this like this and isn’t able to create the full native projects from zero with all related native changes (plist values for example).

I’m i correct? So when doing this is Cordova the only Possibility? :thinking:

Also i’m planning to use Appflow to build the Apps as it offers Monorepo Support (i don’t know if this is relevant)

Hi @EinfachHans, you can definitely your whitelabel/app template approach with Capacitor. The difference would be you would probably copy over an existing ios project and replace the values and files with what you need. There’s no central config.xml for that stuff in Capacitor but changing those values is straightforward in a small script.

re: maps, you can try the cordova google maps in Capacitor, should work fine (some manual configuration may be required)

1 Like

@max Thanks! I will try to use Capacitor for my Project :blush:

So strategy would be:

  1. Script that replaces all my Values
  2. ionic build
  3. npx cap sync

So i can also wrap these steps in an AppFlow webBuildCommand as described here?

I would replace:

  • Splsh Screen & Icons
  • Display Name
  • Version
  • App Id

Does it matter if i replace (run the script) before or after build and sync?

Also: Is it enough to change the App’s Display Name? Is there any reason to change the ios target’s name too? @max