# Building App on device

## Build the app for Android

Once you have modified your app as per your requirements, you can start building the app for Android.&#x20;

{% hint style="info" %}
You need to have all pre-requisites before you can build the app on a device. Check the pre-requisites for [development](https://ionicframework.com/docs/developing/android) and [production](https://ionicframework.com/docs/deployment/play-store)
{% endhint %}

Add an android platform to the project by running

```
$ ionic cordova platform add android
```

This step will add an android platform to the project.&#x20;

{% hint style="info" %}
Previous step will require [Android Studio](https://developer.android.com/studio) installed on your system. You can also install Android SDK without Android Studio, but that is not the recommended way.
{% endhint %}

Now prepare the platform for a build

```
$ ionic cordova prepare android
```

And run the app on your device or simulator by running

```
$ ionic cordova run android
```

{% hint style="info" %}
More information in [ionic documentation](https://ionicframework.com/docs/building/android)
{% endhint %}

## Build the app for iOS

An iOS app can be built only on an Apple based system. Add an iOS platform to the project by running.

```
$ ionic cordova platform add iOS
```

This step will add an iOS platform to the project.&#x20;

{% hint style="info" %}
Previous step will require [Xcode](https://itunes.apple.com/in/app/xcode/id497799835?mt=12) installed on your system. You will also need an Apple developer license and proper provisioning profiles to build the app on device.
{% endhint %}

Now prepare the platform for a build

```
$ ionic cordova prepare ios
```

And run the app on your device or simulator by running

```
$ ionic cordova run ios
```

OR, run the app using **XCode** directly.

{% hint style="info" %}
More information in [ionic documentation](https://ionicframework.com/docs/building/android)
{% endhint %}
