> For the complete documentation index, see [llms.txt](https://enappd.gitbook.io/ionic-5-food-ordering-template/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://enappd.gitbook.io/ionic-5-food-ordering-template/how-to-build-app-and-pwa/building-app-on-device.md).

# Building App on Device

{% hint style="success" %}
***Remember to enter your own GOOGLE API KEY in the source code in the place of YOUR\_API\_KEY. Without this api key, many functionalities might not work, especially maps. Check the*** [***docs***](https://developers.google.com/maps/documentation/javascript/get-api-key) ***for more info***
{% endhint %}

## Build the app for Android <a href="#build-the-app-for-android" id="build-the-app-for-android"></a>

Once you have modified your app as per your requirements, you can start building the app for Android. Add an android platform to the project by running

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

This step will add an android platform to the project.

Previous step will require [Android Studio](https://developer.android.com/studio) preinstalled on your system. You can also install Android SDK without Android Studio, but that is not the recommended way.‌

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

More information in [ionic documentation](https://ionicframework.com/docs/building/android)​‌

## Build the app for iOS <a href="#build-the-app-for-ios" id="build-the-app-for-ios"></a>

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.

Previous step will require [Xcode](https://itunes.apple.com/in/app/xcode/id497799835?mt=12) preinstalled on your system. You will also need an Apple developer license and proper provisioning profiles to build the app on device.‌

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.

More information in [ionic documentation](https://ionicframework.com/docs/building/android)​
