Mobile app test
- Nodev v12 LTS (see https://nodejs.org/download/release/latest-v12.x/)
- Homebrew (see https://brew.sh)
- watchman 4.9.0
- cocoapods 1.10.0
- xcode 13
- Java Development Kit 1.8
- Android Studio
- Android SDK Platform 30
Follow this guide https://reactnative.dev/docs/environment-setup
lint
run the typescript compiler and the eslint showing warnings and errors.
ios-dev
run app on ios emulator and open it if it's not running
pod
install ios pods dependencies
You can find more documentation on: https://reactnative.dev/docs/environment-setup
- brew install node
- brew install watchman
- brew install --cask adoptopenjdk/openjdk/adoptopenjdk8
- run
yarn
ornpm i
to install dependencies - run
yarn pod
ornpm run pod
to install ios dependencies. Remember to install CocoaPods first,sudo gem install cocoapods
. - configure env file if necesary
yarn android
(or npm run ios/android) to launch the app. Keep in mind that you have to launch android emulator manually
- Install react native tools
- run debug android (with emulator open or mobile connected) or debug ios
Dependencies
- nvm
- xcode
Make sure an apropriate env file is present at the root, see CI/CD for how the production env file is generated.
Example .development.env file
DEVAPI_URL=https://raw.githubusercontent.com
- Sometimes on android for compile you need to add this to your gradle.properties file "org.gradle.java.home=/Applications/Android Studio.app/Contents/jre/jdk/Contents/Home"
- master - production
- develop - latest unstable changes
- feature/* - feature branch. This branches are created from develop to add a new feature. To integrate the feature, you should create a pull request to develop.
- bugfix/* - bugfix branch. This branches are created from develop to fix a bug. To integrate the fix, you should create a pull request to develop.
- hotfix/* - hotfix branch. This branches are created from master to fix a production bug. To integrate the fix, you should create a pull request to master and develop.
yarn format
before committing (always do it before committing)