---
# System prepended metadata

title: How to start the project
tags: [React Native]

---

---
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

![](https://i.imgur.com/ICsEq0H.png)

*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)

![](https://i.imgur.com/VjRn2oc.png)

## 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
![](https://i.imgur.com/Aq6MAfE.png)
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,
![](https://i.imgur.com/uctaJJZ.png)
2. Run the app by specific env schema you need:
![](https://i.imgur.com/KAafWi5.png)



## Troubleshoot:
