React Native - nimbletank/nimbletank-coding-standards GitHub Wiki
Running the project using terminal
iOS
react-native run-ios
Android
react-native run-android
Issue running the project?
rm -rf node_modules
- Delete package-lock.json or yarn.lock
npm install
oryarn install
react-native link
npm start -- --reset-cache
react-native run-ios
orreact-native run-android
Running the project on Xcode
- npm run build:ios
- Drag the
main.jsbundle
file into Xcode from<project-name>/ios/<project-name>/main.jsbundle
- Run the project using Xcode build button.
Running the project on Android Studio
- Open the
<project-name>/android
folder using Android Studio - Run the project using Android Studio build cmd and select the emulator you wish.
Upgrading react native
- Delete ios/ and android/
react-native eject
npm install -g react-native-git-upgrade
// if this package is not installedreact-native-git-upgrade
react-native link
react-native run-ios
Add/Update App icons on a single command line for both iOS & Android
npm install -g yo generator-rn-toolbox
brew install imagemagick
yo rn-toolbox:assets --icon <image-directory>
- You will be asked for the name of your react-native project, Project name is
<project-name>
- When you are asked:
? Overwrite ios/<project-name>/Images.xcassets/AppIcon.app iconset/Contents.json?
replay withy
For more information check here: https://github.com/bamlab/generator-rn-toolbox/blob/master/generators/assets/README.md