- run
yarn
ornpm install
- install globally and use react-native-rename -
yarn global add react-native-rename
- create and checkout new branch
- run
react-native-rename <newName> -b <bundleIdentifier>
- change every occurrence of
com.rnapl.app
to your desired package name - change the folder structure to location of
MainActivity.java
andMainApplication.java
according to your package name - change app_name in
./android/app/src/main/res/values/strings.xml
- change bundle Identifier in xCode
- change Display name in xCode
- Note: this won't change files in xCode etc., use automatic approach for that
- modify color string in
./android/app/src/main/res/values/colors.xml
- example of logo files are in
./tempAssets/splashscreen
- replace logo.png files in
./android/app/src/main/res/mipmap-xxxx/
- logo will be shown in the center of screen
- modify background color in
./android/app/src/main/res/values/colors.xml
- if you want to show splash screen differently
- modify the
res/drawable/splash.xml
,res/layout/launch_screen.xml
files to your liking - look at
res/values/styles.xml
. When app starts, it's going to use the AppTheme, after that the react-native-splash-screen will kick in and show the exact same splash screen using SplashScreenTheme
- by default, only portrait mode is allowed on phone devices, landscape is allowed for tablet
- this is set using
res/values-xxx/bools.xml
and with these lines in MainActivity.java inonCreate
method
if (getResources().getBoolean(R.bool.portrait_only)) {
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
}
- change it in xCode in
General
tab underDeployment Info
- delete ./tempAssets folder
project is using redux-devtools-extension, to use this, install:
- react-native-debugger, on macOS can be installed with
brew cask install react-native-debugger
- open with command
open "rndebugger://set-debugger-loc?host=localhost&port=8081"
- open with command
- possibly can be used in chrome with Redux DevTools, but I was unable to run it from there
npm run eslint
- run eslint check
npm run flow
- run flow check
npm run tsc
- watch for typescript errors
- if git hooks are not installed, run
./node_modules/git-hooks/bin/git-hooks install
- if you change path to your project folder (eg. you renamed it or moved it), delete folder
.git/hooks
and run run./node_modules/git-hooks/bin/git-hooks install