# How to Build ArmorPaint for Android and iOS: Complete Cross-Platform Guide

> Build ArmorPaint for Android and iOS with this complete cross-platform guide. Generate native projects using simple commands and compile directly in Android Studio or Xcode. Get started today.

- Repository: [Armory 3D/armorpaint](https://github.com/armory3d/armorpaint)
- Tags: how-to-guide
- Published: 2026-09-11

---

**To build ArmorPaint for Android and iOS, run `../base/make --target android` or `../base/make --target ios` from the `paint/` directory to generate native Gradle or Xcode projects, then open them in Android Studio or Xcode to compile the native binaries.**

The armory3d/armorpaint repository uses a custom JavaScript-based build pipeline rather than standard build systems like CMake or Make for mobile targets. Understanding how to build ArmorPaint for Android and iOS requires navigating the [`base/tools/make.js`](https://github.com/armory3d/armorpaint/blob/main/base/tools/make.js) script, which generates platform-specific native projects from shared C/C++ sources and platform-specific bridges.

## Understanding the ArmorPaint Build Architecture

The build process centers on **Node.js scripts** that act as a meta-build system. The file [`base/tools/make.js`](https://github.com/armory3d/armorpaint/blob/main/base/tools/make.js) orchestrates project generation by parsing command-line flags, selecting appropriate templates, and substituting configuration values.

When targeting mobile platforms, the script executes a specific pipeline:

- **Template Processing**: Copies Gradle configurations for Android or Xcode project stubs for iOS from `base/tools/` into `build/ArmorPaint/`
- **Source Aggregation**: Appends platform-specific C sources—`sources/backends/android_*.c` for Android or `sources/backends/ios_*.c` for iOS—via configurations in [`base/project.js`](https://github.com/armory3d/armorpaint/blob/main/base/project.js)
- **Placeholder Substitution**: Injects package names, SDK versions, and permissions into [`AndroidManifest.xml`](https://github.com/armory3d/armorpaint/blob/main/AndroidManifest.xml) or Xcode project settings

## Prerequisites for Mobile Compilation

Before generating projects, install the required native toolchains:

- **Android**: Android Studio with Android SDK and NDK (includes `aarch64-none-linux-android21` toolchain)
- **iOS**: Xcode with iOS SDK and command-line tools (supports `arm64` architecture)

Clone the repository and navigate to the paint subdirectory:

```bash
git clone https://github.com/armory3d/armorpaint
cd armorpaint/paint

```

## Building ArmorPaint for Android

### Generate the Android Project

Execute the make script with the Android target flag:

```bash
../base/make --target android

```

This command triggers several operations defined in [`base/tools/make.js`](https://github.com/armory3d/armorpaint/blob/main/base/tools/make.js):

- Creates the output directory structure at `build/ArmorPaint/`
- Copies template files including `base/tools/android/build.gradle.kts` and [`base/tools/android/AndroidManifest.xml`](https://github.com/armory3d/armorpaint/blob/main/base/tools/android/AndroidManifest.xml)
- Invokes `write_app_gradle` to inject default values: package name `org.armory3d`, `compileSdkVersion 36`, `minSdkVersion 35`, and `targetSdkVersion 36`
- Executes `write_cmake_lists` to produce a [`CMakeLists.txt`](https://github.com/armory3d/armorpaint/blob/main/CMakeLists.txt) referencing all C/C++ sources and include directories
- Processes `icon_ios.png` into appropriately sized resources in `mipmap-*/` folders

### Compile in Android Studio

Open the generated project:

```bash
open build/ArmorPaint/ArmorPaint

```

In Android Studio, sync the Gradle files, select a connected device or emulator, and click **Run**. The NDK compiles the native code alongside the Java/Kotlin bridge files located in `base/sources/backends/data/android_java/`, including [`IronActivity.kt`](https://github.com/armory3d/armorpaint/blob/main/IronActivity.kt), producing the final APK.

## Building ArmorPaint for iOS

### Generate the iOS Project

From the `paint/` directory, run:

```bash
../base/make --target ios

```

The script generates `build/ArmorPaint/ArmorPaint.xcodeproj` by:

- Aggregating iOS-specific sources defined in [`base/project.js`](https://github.com/armory3d/armorpaint/blob/main/base/project.js), including [`sources/backends/ios_system.h`](https://github.com/armory3d/armorpaint/blob/main/sources/backends/ios_system.h) and Objective-C bridge files from `base/sources/backends/data/ios/`
- Copying and configuring Xcode project templates with default architectures set to `arm64`
- Embedding icons and resources into the generated asset catalog

### Compile in Xcode

Launch the project:

```bash
open build/ArmorPaint/ArmorPaint.xcodeproj

```

Select a physical iOS device or simulator scheme, then press **Run**. Xcode compiles the Objective-C/Swift bridges with the C core, handling code signing and entitlements automatically.

## Customizing Mobile Build Parameters

Override default settings without modifying source templates using the **`--set`** flag, or edit [`base/project.js`](https://github.com/armory3d/armorpaint/blob/main/base/project.js) directly to persist changes.

Generate an Android build with a custom package name and ABI filter:

```bash
../base/make --target android \
    --set "android.package=com.example.custompaint" \
    --set "android.abiFilters=arm64-v8a"

```

Specify version and build numbers for iOS:

```bash
../base/make --target ios \
    --set "ios.version=2.0" \
    --set "ios.build=42"

```

Alternatively, modify the `project.target_options.android` or `project.target_options.ios` objects in [`base/project.js`](https://github.com/armory3d/armorpaint/blob/main/base/project.js) to change default permissions, SDK levels, or bundle identifiers across all future builds.

## Summary

- ArmorPaint uses [`base/tools/make.js`](https://github.com/armory3d/armorpaint/blob/main/base/tools/make.js) as its meta-build system to generate native mobile projects from shared C/C++ sources.
- The `--target android` flag produces Gradle projects in `build/ArmorPaint/` using templates from `base/tools/android/`, including `build.gradle.kts` and [`AndroidManifest.xml`](https://github.com/armory3d/armorpaint/blob/main/AndroidManifest.xml).
- The `--target ios` flag generates Xcode projects with Objective-C bridges from `base/sources/backends/data/ios/` and configurations from [`base/project.js`](https://github.com/armory3d/armorpaint/blob/main/base/project.js).
- Final compilation requires opening generated projects in **Android Studio** or **Xcode** to leverage platform-specific SDKs, NDK toolchains, and code signing capabilities.
- Build parameters such as package names, versions, and ABI filters can be customized via command-line `--set` flags or by editing the `project.target_options` objects in [`base/project.js`](https://github.com/armory3d/armorpaint/blob/main/base/project.js).

## Frequently Asked Questions

### What build system does ArmorPaint use for mobile platforms?

ArmorPaint uses a custom Node.js-based build system defined in [`base/tools/make.js`](https://github.com/armory3d/armorpaint/blob/main/base/tools/make.js) and configured in [`base/project.js`](https://github.com/armory3d/armorpaint/blob/main/base/project.js). Rather than using CMake or Make directly for mobile binaries, this system generates native projects—Gradle builds for Android and Xcode projects for iOS—that are then compiled by the platform's native IDE.

### Where are the generated Android and iOS project files located?

After running the make command with `--target android`, project files appear in `build/ArmorPaint/` including `build.gradle.kts`, `settings.gradle.kts`, and [`AndroidManifest.xml`](https://github.com/armory3d/armorpaint/blob/main/AndroidManifest.xml) templates. For iOS builds using `--target ios`, the system creates `build/ArmorPaint/ArmorPaint.xcodeproj` along with associated Objective-C source references and asset catalogs.

### How do I change the package name or version for mobile builds?

Pass custom values via the `--set` flag when invoking make, such as `--set "android.package=org.custom.app"` for Android or `--set "ios.version=1.5"` for iOS. You can also permanently adjust these values in the `project.target_options` object within [`base/project.js`](https://github.com/armory3d/armorpaint/blob/main/base/project.js) to apply defaults across all builds.

### Can I build ArmorPaint for mobile without Android Studio or Xcode?

No. While [`base/tools/make.js`](https://github.com/armory3d/armorpaint/blob/main/base/tools/make.js) generates the project files and CMake configurations, the actual compilation and packaging requires the native toolchains. Android builds need Android Studio with the NDK to handle APK packaging and signing, while iOS builds require Xcode with the iOS SDK for code signing, entitlements, and device deployment.