# Installing

**Inorder to do this step, please make sure all compatibility requirements were installed**

After install all development OS at [Compatibility Requirements](/kindie/compatibility-requirements.md) now you have to install some tools, dependencies to run the Kindie mobile app.

Follow [**Setting up the development environment**](https://reactnative.dev/docs/environment-setup) and install sample app to make sure you:

* [ ] **React Native CLI Quickstart (We do not use Expo)**
* [ ] **Installing dependencies**
* [ ] **Created a new application**
* [ ] **Built "AwesomeProject" React Native application**

<div align="left"><img src="/files/-M7l7a-HWP3zyKrP6ARt" alt="AwesomeProject sample"></div>

{% hint style="info" %}
**AwesomeProject** **MUST** be installed before run **KINIDE**
{% endhint %}

## **Step 1: Download source code, unzip and open project by Visual Studio Code:**

![](https://zinisoft.net/wp-content/uploads/2019/11/unzip-app-sourcecode.png)

![](https://zinisoft.net/wp-content/uploads/2019/11/install-app.png)

{% hint style="info" %}
Note: You can toogle terminal by hot keys Ctrl + \`
{% endhint %}

## **Step 2: To install the React Native command-line utility, run the below command in your terminal:**

```
npm install -g react-native-cli
```

React Native is an open-source mobile application framework created by Facebook.It is used to develop applications for Android, iOS, Web and UWPby enabling developers to use React along with native platform capabilities. You can refer full document about React Native here:

{% hint style="info" %}
React Native is an open-source mobile application framework created by Facebook.It is used to develop applications for Android, iOS, Web and UWPby enabling developers to use React along with native platform capabilities. You can refer full document about React Native here:

[**https://facebook.github.io/react-native/**](https://facebook.github.io/react-native/)
{% endhint %}

## &#x20;**Step 3: Install others npm Package Manager:**

```
npm install
```

## &#x20;**Step 4: Run the app**

&#x34;**.**&#x31; If you need to build for Android device:

```
react-native run-android
```

4.2 If you need to build for iOS device:

```
cd ios 
pod install 
cd .. 
react-native run-ios
```

{% hint style="info" %}
Note that for **react-native run-android** to work, you should have an open Android emulator or an Android device with USB Debugging enabled connected to your system via a USB cable.

If everything is set up correctly, you should see your new app running in your Android emulator shortly.
{% endhint %}

### Commons errors

```
app-kindie-master> react-native run-android
react-native : File C:\Users\jaspr\AppData\Roaming\npm\react-native.ps1 cannot be loaded. The file 
C:\Users\jaspr\AppData\Roaming\npm\react-native.ps1 is not digitally signed. You cannot run this script on the current system. For more 
information about running scripts and setting execution policy, see about_Execution_Policies at https:/go.microsoft.com/fwlink/?LinkID=135170.    
At line:1 char:1
```

This is a **powershell** security policy, to fix it run the following:

```
PS C:\> Set-ExecutionPolicy RemoteSigned 
```

The stricter the policy, the more secure your system becomes.

You can change RemoteSigned to other options like: `Restricted`, `AllSigned`, `RemoteSigned`, `Unrestricted`

&#x20;Source: <https://tecadmin.net/powershell-running-scripts-is-disabled-system/>

**1. Error: Pod command not found?**

```
pod install 
-bash: pod: command not found
```

**Answer**: You have to install cocapods

```
sudo gem install cocoapods
```

#### **2. Error: react-native command not found?**

```
react-native run-ios
bash: react-native: command not found
```

**Answer**: because you did not install react native commandline, please run to install

```
npm i -g react-native-cli
```

&#x33;**. Unable to load script. Make you're either running a Metro server...**

![](/files/-M8yuBhyX6dVwH-vsYIX)

**Answer**: You need starting dev server, from  Visual Studio Code terminal, run:

```
react-native start
```

**4. Could not install npm?**

![](/files/-M8yu4qe9Hc1S5bA8nF5)

Answer: Because the npm is too old. You have to remove npm and install again ( refer: <https://reactnative.dev/docs/environment-setup>)

\*\*\*  We recommend installing Node and Python2 via [Chocolatey](https://chocolatey.org/), a popular package manager for Windows.

**5. Build failed?**

![](/files/-M8yu7muojiV2GlKyBCn)

Answer: Clean android and build again

```
cd android
.\gradlew clean 
cd ..
react-native run-android
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://zinisoft-net.gitbook.io/kindie/mobile-app/installing.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
