---
tags: React Native
---
# How to start the project
## Setting up the development environment:
[Follow official document](https://reactnative.dev/docs/environment-setup)
And switch tab to React Native CLI Quick start tab

*suggestion: Genymotion emulator is better than Android Studio built-in emulater*
## Prepare your .env files:
We don't have .env.* files on github repo for the security issue.
It's basically impossible to prevent users from [reverse engineering mobile app secrets] (https://rammic.github.io/2015/07/28/hiding-secrets-in-android-apps/), so design your app (and APIs) with that in mind.
So ask your superior officer for .env files' information
You will need these three files below:
* .env.development
* .env.staging
* .env.production (For archive)

## Run the script:
Check the package.json file, your will see many script
For development you can run:
* yarn android:dev
* yarn ios:dev
### Android
Start the emulator before you run the script, usually the script open the emulator fail
1. You can open the ios project from `YouProjectName/android` by Android Studio

2. run the script in package.json
### iOS
If you are the first time to run the project, I suggest you run the app by iOS directly
1. You can open the ios project from `YouProjectName/ios` by Xcode,

2. Run the app by specific env schema you need:

## Troubleshoot: