We are developing an app for a customer that owns different brands and the we have to build the same app(functionalities) for each brand in separate apks to publish them in the stores.
The main differences between the apks will be the logos and main colors. We can achieve this with a gulp task that chooses between the correct css and imgs before the build process.
The problem comes with the app name and id(cordova’s config.xml file). Each brand will have it’s own app name and id, how can we handle this requirements to automate the different build processes? Is it posible to have different config.xml files in the same project?
Hi Jon , I have a similar issue and i was wondering if you had found a solution. the only thing i can think of is to create a gulp task that removes/adds the platform after modifying the config.xml. once fro each brand.
We finally took the next solution that fits our needs although I think it could be improved.
We hace separate Ionic projects for each brand that share a common “src” folder. (Actually, we have three Ionic projects for each brand: Android, Android&xwalk and ios)
We have a common “src” folder for all the projects. Inside this “src” folder, there is a folder for each brand for brand specific code.
Every Ionic project has a gulp task that copies all the code from the outer “src” to it’s www folder, and overrides the common code with it’s brand specific folder. We have parametrized the task with a “compress” param to be able tu run the minify,uglify, etc. tasks for production builds.
We follow the same rules with the scss files, so we have brand specific folders. We also have a gulp task that runs a scss compilation of each brand and copies the result to it’s brand folder inside src.