The following help
- MacOS Catalina 10.15 with XCode 12.4 or above.
-
NODE: This project was built with Node v15.14. You are free to install v15 separately, though recommended way is using NVM. For a simple tutorial visit https://tecadmin.net/install-nvm-macos-with-homebrew/ for details.
-
RUBY and Cocoapods: The project uses version ruby 2.7.2p137 which you may install separately, though recommended way is again using RVM. For a simple tutorial visit https://nrogap.medium.com/install-rvm-in-macos-step-by-step-d3b3c236953b
You need to install latest cocapods. This project uses version 1.11.2
sudo gem install cocoapods
Make sure you have yarn installed, recommended way is to install it as global package withing the version of Node used
npm -g install yarn
Install Javascript dependencies for the project
yarn install
To ease debugging, launch the Metro packager (equivalent to Webpack Dev Server) in another window so you
have a better view of bundling error messages: before launching yarn android/ios
, type in another tab:
yarn start
You will need an up-to-date Mac with XCode. Get it from the App Store if you don't have it yet (it's free).
Then install the native dependencies with it:
cd ios && pod install && cd ..
You're now ready to launch the app in the iOS simulator!
yarn ios
Install Android Studio
STEP1: Install the build tools and the device emulator
- Launch Android Studio and skip the setup if needed
- At the bottom right of the project selection window, click on "Configure" and select "SDK Manager"
- Tick "Show Package details" at the bottom right of the window
- In "Android 10.0 (Q)", tick "Android SDK Platform 29" and "Google Play Intel x86 Atom_64 System Image"
- In SDK tools, tick "Android SDK Build-Tools", "Android Emulator", "Android SDK Platform-Tools", "Android SDK Tools" and (recommended albeit not obligatory) "Intel x86 Emulator Accelerator (HAXM installer)".
- Click OK, accept all licences and perform the install.
STEP2: If you don't have one yet, create a virtual Android device using the AVD manager in Android Studio:
- Launch Android Studio and skip the setup if needed
- At the bottom right of the project selection window, click on "Configure" and select "AVD Manager"
- Create a new device and follow the assistant. You should use a PlayStore-compatible image, for example
- Device: Pixel 4
- Image: Android 10.0 x86_64 (Google Play)
- Disable device external frame unless you want to lose some height of your screen
STEP 3: Configure the ANDROID_HOME
environment variable
The React Native tools require some environment variables to be set up in order to build apps with native code.
Add the following lines to your ~/.bash_profile
or ~/.bashrc
(if you are using zsh then ~/.zprofile
or ~/.zshrc
) config file:
export ANDROID_HOME=$HOME/Library/Android/sdk
export PATH=$PATH:$ANDROID_HOME/emulator
export PATH=$PATH:$ANDROID_HOME/tools
export PATH=$PATH:$ANDROID_HOME/tools/bin
export PATH=$PATH:$ANDROID_HOME/platform-tools
Restart your shell to get the variables set.
You are now ready to start the app in the Android Simulator!
yarn android
If it fails to install the app, try launching your device in the emulator.