Based on a tutorial by Amedo Zucchetti
- Clone the repository
- Run
cd react-native-white-label/whitelabelto navigate to the project repository - Run
npm ito install the node dependencies
- Make sure you have XCode, XCode Developer tools and a simulator set up
- Run
npm run install:ios - Run
npm run iosto launch the application on your IOS simulator (this might take a while)
- Make sure you have Android Studio, and an android emulator installed
- Make sure you have followed the React Native environment setup guide
- Run
npm run install:keygenand answer the questions when prompted - Run
npm run androidto launch the application on your Android Emulator
The white-label configuration script allows to configure the whitelabel
project to use a specific combination of modules and a specific theme, without
directly changing the source code. It can be run from the root directory with
./wl-configure.sh -a whitelabel -m Foo,Baz -t solarized-dark
It supports the following flags
a: The name of the project to configure.whitelabelwill configure thewhitelabeldirectory. Other names will configureapp-<name>projects; for instance,-a testwill configure projectapp-test.m: List of comma-separated modules to be used. These modules must be present in themodulesdirectory. The order provided is the order with which modules will be exported, so-m Foo,Baris different from-m Bar,Foo.t: Theme to use in the app. It must be one present in thethemedirectory.
The white-label generation allows to generate projects (new directories) based
on whitelabel, with a particular configuration, display name and bundle id.
This allows to install on the same device multiple applications originating from
the whitelabel one.
The generation can be done with
./wl-generate.sh -a test -d "Test" -b com.test -m Baz,Bar,Foo -t solarized-light
and will procude a new directory (or override the existing) app-<name>. In our
example, it will generate directory app-test. The script supports the
following flags
a: Name of the project to generate for-a name, the projectapp-namewill be created. It cannot bewhitelabel.d: Display name for the application, will be visible under the app icon on the device.b: Bundle identifier for the app. It must consist of dot-separated alpha-numeric characters. It should be unique for every application and it should not becom.whitelabel(the default for thewhitelabelproject), or two app may clash.m: List of comma-separated modules to be used. These modules must be present in themodulesdirectory. The order provided is the order with which modules will be exported, so-m Foo,Baris different from-m Bar,Foo.t: Theme to use in the app. It must be one present in thethemedirectory.