# iOS / iPadOS with RoboVM

> The RoboVM toolchain (AOT), the IOSLauncher, Info.plist and the WKWebView sensitive points.

Source: https://crossfly.dev/docs/platforms/ios — CrossFly documentation. Full docs as one file: https://crossfly.dev/llms-full.txt

# iOS / iPadOS (RoboVM) 🍎

The iOS target requires **macOS + Xcode**. The **RoboVM** toolchain does AOT (Java → native ARM code).

## Run
```bash
gradlew :ios:launchIPhoneSimulator
```
The `IOSLauncher` creates the application: `new IOSApplication(new Main(true, getCommandline()), configuration)`.
`Device.platform` will be `IPHONE` or `IPAD`.

## `Info.plist` — permissions and metadata
Unlike Android (runtime permission), on iOS the **usage keys go in the `Info.plist`**:
- usage descriptions for **camera**, **location**, **Bluetooth**, **microphone** (mandatory, otherwise the
  app is rejected);
- icons and *launch screen*.

## ⚠️ Sensitive points
- **`WKWebView`**: `evaluateJavaScript` is **restricted** — the JS↔Java bridge of `WebContainer` is more
  limited than on Android/desktop.
- **Apple developer account** + *provisioning profile* are required to run on a **real
  device** (the simulator does not require them).
- AOT builds are **slow** — one more reason to develop on the [desktop](/docs/platforms/desktop-lwjgl3) and only
  validate on iOS.

## Best practices
- Fill in **all** the usage keys in the `Info.plist` before submitting (rejection is common for this).
- Test on the **simulator** early; leave the real device for final validation (provisioning).

## Common mistakes
- Missing a usage key in the `Info.plist` (crash when accessing the feature, or App Store rejection).
- Assuming full `evaluateJavaScript` in `WKWebView` (it is restricted).

## See also
- [Build and distribution](/docs/platforms/building-and-releasing)
