Skip to main content
This guide covers compilation for mobile devices (Android and iOS). Mobile compilation requires additional setup beyond desktop builds.
Before starting, make sure your game builds on desktop. Check the main compilation guide first.

Android Compilation

Android builds require the Android SDK, NDK, and Java Development Kit.
1

Create Android tools folder

Create a new folder to store Android tools and remember its path:
mkdir C:\android-tools
2

Set ANDROID_HOME environment variable

Open a terminal as Administrator and run:
setx ANDROID_HOME "C:\android-tools" /M
Replace the path with your actual folder location.
3

Download Android Command-line Tools

Download the Android Studio Command-line Tools and extract the ZIP into your Android tools folder.
4

Install SDK components

Install required SDK components (you may need to restart your terminal):
sdkmanager --install "build-tools;35.0.0" "ndk;29.0.13113456" "platforms;android-29" "platforms;android-35"
The latest NDK is not compatible with Lime. You must use NDK 29.0.13113456.
5

Install JDK 17

Download and install JDK 17 (MSI).
6

Configure Lime for Android

Run Lime’s Android setup:
lime setup android
When prompted, provide these paths:
  • Android SDK: C:\android-tools
  • Android NDK: C:\android-tools\ndk\29.0.13113456
  • JDK: C:\Program Files\Java\jdk-17
7

Build for Android

Build and deploy to your Android device:
lime test android

Android Build Configuration

The Android build is configured in project.hxp with these settings:
// Minimum SDK version
ANDROID_MINIMUM_SDK_VERSION = 28

// Target SDK version
ANDROID_TARGET_SDK_VERSION = 35

// Required NDK version
NDK_VERSION = "29.0.13113456"

Android-Specific Flags

If you want to reduce APK size by excluding ARMv7 (32-bit ARM):
lime test android -DEXCLUDE_ARMV7
This only includes ARM64, reducing file size but dropping support for older devices.

iOS Compilation

You can only build for iOS on a computer running macOS.
iOS compilation requires Xcode and the iOS SDK.
1

Verify desktop build works

Make sure your game builds on desktop first. See the main compilation guide.
2

Install Xcode

Download and install Xcode from the Mac App Store.
3

Download iPhone SDK

Open Xcode and download the iPhone SDK when prompted (usually the first thing that appears).
4

Build for iOS

Build the game and open it in Xcode:
lime test ios -xcode
To test in the simulator instead of a real device:
lime test ios -simulator
5

Sign the app (for real devices)

To run on a real iOS device, you need an Apple Developer account ($99/year).In Xcode:
  1. Press Cmd + , to open Settings
  2. Go to Accounts
  3. Add your Apple ID
  4. Select your Team ID in the project settings

iOS Troubleshooting

Error: A required plugin failed to load. Please ensure system content is up-to-date — try running 'xcodebuild -runFirstLaunch'.Solution: Make sure you have the iOS SDK installed (see Step 2 above).
xcodebuild -runFirstLaunch
Error: error: No Accounts: Add a new account in Accounts settings. (in target 'Funkin' from project 'Funkin')Solution:
  1. Open Xcode
  2. Press Cmd + , to open Settings
  3. Select Accounts
  4. Add your Apple ID
Error: error: No Account for Team "Z7G7AVNGSH". Add a new account in Accounts settings or verify that your accounts have valid credentials.Solution: Open project.hxp and change IOS_TEAM_ID to your personal team’s ID.
static var IOS_TEAM_ID:String = "YOUR_TEAM_ID";
Find your Team ID in Xcode under Settings > Accounts.
Error: error: Failed Registering Bundle Identifier: The app identifier "me.funkin.fnf" cannot be registered to your development team because it is not available.Solution: The Funkin’ Crew owns me.funkin.fnf. Open project.hxp and change PACKAGE_NAME to a unique value:
static final PACKAGE_NAME:String = "com.yourname.fnf";
Error: error: No profiles for 'me.funkin.fnf' were found: Xcode couldn't find any iOS App Development provisioning profiles matching 'me.funkin.fnf'Solution: Same as Bundle Identifier Error — change the PACKAGE_NAME in project.hxp.

Mobile-Specific Build Flags

Mobile builds have several unique feature flags:
lime test android -DFEATURE_TOUCH_CONTROLS
Most mobile-specific features are enabled by default on mobile builds. Compressed textures are only enabled on release builds.

Next Steps

General Compilation

Return to the main compilation guide

Troubleshooting

Fix common compilation issues

Contributing

Learn how to contribute code

Build Flags

View all available build flags

Build docs developers (and LLMs) love