---
description: This is guideline to help you install ZiniStore App (React Native)
---

# App config

### Setup environment

Before you start to run on iOS, make sure you were setting up the development environment ([https://reactnative.dev/docs/environment-setup](https://reactnative.dev/docs/environment-setup)).&#x20;

NOTE: The instructions are a bit different depending on your development operating system, and whether you want to start developing for iOS or Android. you MUST pick one to start with, since the setup is a bit different (screenshot)

![](https://3309432529-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M4Wv-V9WSwhK3zwcNBL%2F-M7BsmqTPBg7u-g0ko3h%2F-M7BvJtn1kcTf_WxBY2Y%2Fenv-setup.png?alt=media\&token=40d66c04-5ca4-4e37-8a14-03399c39f249)

2/ Unzip file `ZiniStore.zip` inside the app folder.

3/ Open Visual Studio Code and go to ZiniStore project source code

![If TERMINAL tab was not display, you have to open from menu: View > Terminal](https://3309432529-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M4Wv-V9WSwhK3zwcNBL%2F-M7Bqv09AhgYHHJkxQUZ%2F-M7BrPq6_UsmbLwC6LJf%2Fterminal.png?alt=media\&token=3a7a0dfe-85f0-44c2-ac6c-e194c34438d2)

From Visual Code Terminal , install the independence packages:

```
npm install
```

#### Run on Android devices

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

#### Run on iOS device

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

If everything is set up correctly, you should see your new app running in your Android/iOS emulator shortly.

### Basic config

![](https://3309432529-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M4Wv-V9WSwhK3zwcNBL%2F-M7BzQcp7cj0bXgUZ5a5%2F-M7C-AIqRWi1g8DPeX_B%2Fbasic-settings.png?alt=media\&token=d742f20b-5ac4-498e-998c-d135d1329b1b)

Open `src/config/index.js` and change **hostAPI** to your store currently, and replace **consumerKey + consumerSecret** [previous step](https://zinisoft-net.gitbook.io/zinistore-docs/web-config#step-2-woocommerce-config).&#x20;

### Common errors

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

![](https://3309432529-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M4Wv-V9WSwhK3zwcNBL%2F-M7DWmXGNr968bZzceqG%2F-M7DX3pV5aNmeAGDfPo7%2FUnable%20to%20load%20script.png?alt=media\&token=8ca5df79-d5c7-4ab6-9dd5-5939b92fad2d)

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

```
react-native start
```

**4. Could not install npm?**

![](https://3309432529-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M4Wv-V9WSwhK3zwcNBL%2F-M7DXdZriXPUnx59RMzs%2F-M7DYb-F5ypN4-EJnJig%2Ferror.jpeg?alt=media\&token=af067126-5d83-43de-a7e4-412dc2818f79)

Answer: Because the npm is too old. You have to remove npm and install again ( refer: [https://reactnative.dev/docs/environment-setup](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?**

![](https://3309432529-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M4Wv-V9WSwhK3zwcNBL%2F-M7DZ9qV0TCm5n8cJUwK%2F-M7Di7oxZ71hWyGRNBWG%2Fer-01.png?alt=media\&token=176b1d87-7eb6-4838-b091-f7f3f95c7dec)

Answer: Clean android and build again

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

