Integration between firebase and React Native
- Install ExpoCLI:
$ npm i -g expo-cli
- Install yarn:
$ brew install yarn
- Install react native project create:
$ expo init app
> blank (typescript) template - Install dependencies:
$ cd app && yarn install
- Running:
$ npm start
- IF NEEDED:
$ expo upgrade
- IF STUCKED IN ANY ERROR:
$ expo doctor
- Create a Nexus 5X with google play services
- Create a Pixel 3a with google play services
- Run:
$ yarn run start
or$ yarn start
- Press "d" to open dev tools or enable auto dev tools by clicking: shift+d
- INSTALLING EXPO_APP: 1. For the fisrt time Click on: "Run on Android device/emulator" to install ExpoApp on it 1. wait it to finish the javascript build 1. on the first time it spend more time because it is installing the ExpoApp 1. close the emulator that already installed ExpoApp & click again on the command to install on the another
- RUNNING APP ON EXPO_APP:
- Open/Start the Device/Emulator
$ npm start
- CORRECT is to open developer tools:
d
- type the choosen emulator:
a=android ; i=ios ; w=web
- CORRECT is to open developer tools:
expo-cli supports following Node.js versions:
-
=12.13.0 <13.0.0 (Maintenance LTS)
-
=14.0.0 <15.0.0 (Active LTS)
-
=15.0.0 <17.0.0 (Current Release)
- Install Chocolate (need to open power shell as admin):
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
- Install dependencies:
choco install -y nodejs.install openjdk8
- Download android studio & download the SDK Platforms (latest & version Q (10)) & install SDK Tools (ADM or Intel)
- Setup environment variables:
- Add new variable: ANDROID_HOME = C:\Users\user\AppData\Local\Android\Sdk
- Add to the path: C:\Users\user\AppData\Local\Android\Sdk\platform-tools
- Windows Terminal (download from Microsoft Store) allows to open any Windows bash type (git bash, powershell & prompt)
- Change windows terminal (on settings) to git bash as default bash
- On windows terminal (using git bash):
npm i -g expo-cli
- IF NETWORK ERROR:
npm config set registry http://registry.npmjs.org/
&&npm config set strict-ssl false
&& restart windows
- IF NETWORK ERROR:
- Sample project test init:
expo init
- Register (sign up):
expo register
- Login (sign in):
expo login
- Check login:
expo whoami
- Package: react-native-vector-icons (https://oblador.github.io/react-native-vector-icons/)