tauri-apps/tauri · error · tauri_cli::error::Error

iOS platform not installed

Error message

iOS platform not installed

What it means

Thrown by `ensure_ios_runtime_installed` in the Tauri CLI when a `tauri ios` command needs an iOS Simulator runtime but `xcrun simctl list runtimes --json` reports no runtime whose name starts with 'iOS'. The CLI first offers an interactive prompt to run `xcodebuild -downloadPlatform iOS`; if you decline (or the prompt defaults to 'No' in a non-TTY), it bails with this message.

Source

Thrown at crates/tauri-cli/src/mobile/ios/mod.rs:444

    .any(|r| r.name.starts_with("iOS"))
  {
    log::warn!("iOS platform not installed");
    let install_ios = crate::helpers::prompts::confirm(
      "Would you like to install the latest iOS runtime?",
      Some(false),
    )
    .unwrap_or_default();
    if install_ios {
      duct::cmd("xcodebuild", ["-downloadPlatform", "iOS"])
        .stdout_file(os_pipe::dup_stdout().unwrap())
        .stderr_file(os_pipe::dup_stderr().unwrap())
        .run()
        .map_err(|e| Error::CommandFailed {
          command: "xcodebuild -downloadPlatform iOS".to_string(),
          error: e,
        })?;
    } else {
      crate::error::bail!("iOS platform not installed");
    }
  }
  Ok(())
}

fn detect_target_ok<'a>(env: &Env) -> Option<&'a Target<'a>> {
  device_prompt(env, None).map(|device| device.target()).ok()
}

fn open_and_wait(config: &AppleConfig, env: &Env) -> ! {
  log::info!("Opening Xcode");
  if let Err(e) = os::open_file_with("Xcode", config.project_dir(), env) {
    log::error!("{e}");
  }
  loop {
    sleep(Duration::from_secs(24 * 60 * 60));
  }
}

View on GitHub (pinned to 52e4b6e71d)

Solutions

  1. Install the iOS platform directly: `xcodebuild -downloadPlatform iOS` (or Xcode > Settings > Components > Get iOS platform).
  2. Re-run the `tauri ios` command and answer Yes to the install prompt.
  3. Verify the runtime is now present: `xcrun simctl list runtimes` should list an iOS runtime.
  4. Ensure `xcode-select -p` points at full Xcode (e.g. /Applications/Xcode.app/Contents/Developer), not just CLT.

Example fix

# before
xcode-select -p
# /Library/Developer/CommandLineTools  (no iOS platform)
tauri ios dev
# error: iOS platform not installed

# after
sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
xcodebuild -downloadPlatform iOS
tauri ios dev
Defensive patterns

Strategy: validation

Validate before calling

#!/usr/bin/env bash
# Run before `tauri ios dev` / in CI setup
if ! xcrun simctl list runtimes 2>/dev/null | grep -q '^iOS'; then
  echo "iOS runtime missing - installing"
  xcodebuild -downloadPlatform iOS
fi

Prevention

When it happens

Trigger: Running `tauri ios dev` / `tauri ios build` (any flow that reaches the device/simulator prompt) on macOS where Xcode or its command line tools are installed but the iOS Simulator runtime/platform is absent, and the confirmation 'Would you like to install the latest iOS runtime?' is answered No or auto-defaults in CI.

Common situations: Fresh Mac or fresh Xcode install that ships without the iOS platform; CI runners that install only the macOS SDK; Xcode updated and the iOS runtime was removed; `xcode-select` pointing at Command Line Tools instead of full Xcode.

Related errors


AI-assisted analysis of tauri-apps/tauri@52e4b6e71d (2026-08-20). Data as JSON: /api/errors/79b3df7995c5bcf9. Report an issue: GitHub.