Use same expo codebase with different apps

I’m facing a problem, which is I need to white-label an application. This means I need different build in the app store with different application names, these apps should load the same JS bundle.

I’m looking for the best way to solve this problem.

My first idea is to put everything into the bundle, and runtime make these decisions such as colours.
For example, I put builds in the app store with a CI process: AppGreen, AppBlue. (All these builds based on the same expo codebase.)
When I load the AppGreen, my app should be green, so I want to be able to load the assets in my app by the application name like this:

const appName = 'AppGreen'; // <--- this should come from the app

import assets from './assets';
const { colors, config, images } = assets[appName];

Do you have any better idea? Also to solve the problem in this way, I still need to be able to get out the app name.

You can use different app.json files, and make the build using the --config flag:

exp build:ios --config app2.json

Then you can access the build’s colour using Constants.manifest.

1 Like

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.