{"record":{"id":"79b3df7995c5bcf9","repo":"tauri-apps/tauri","slug":"ios-platform-not-installed","errorCode":null,"errorMessage":"iOS platform not installed","messagePattern":"iOS platform not installed","errorType":"exception","errorClass":"tauri_cli::error::Error","httpStatus":null,"severity":"error","filePath":"crates/tauri-cli/src/mobile/ios/mod.rs","lineNumber":444,"sourceCode":"    .any(|r| r.name.starts_with(\"iOS\"))\n  {\n    log::warn!(\"iOS platform not installed\");\n    let install_ios = crate::helpers::prompts::confirm(\n      \"Would you like to install the latest iOS runtime?\",\n      Some(false),\n    )\n    .unwrap_or_default();\n    if install_ios {\n      duct::cmd(\"xcodebuild\", [\"-downloadPlatform\", \"iOS\"])\n        .stdout_file(os_pipe::dup_stdout().unwrap())\n        .stderr_file(os_pipe::dup_stderr().unwrap())\n        .run()\n        .map_err(|e| Error::CommandFailed {\n          command: \"xcodebuild -downloadPlatform iOS\".to_string(),\n          error: e,\n        })?;\n    } else {\n      crate::error::bail!(\"iOS platform not installed\");\n    }\n  }\n  Ok(())\n}\n\nfn detect_target_ok<'a>(env: &Env) -> Option<&'a Target<'a>> {\n  device_prompt(env, None).map(|device| device.target()).ok()\n}\n\nfn open_and_wait(config: &AppleConfig, env: &Env) -> ! {\n  log::info!(\"Opening Xcode\");\n  if let Err(e) = os::open_file_with(\"Xcode\", config.project_dir(), env) {\n    log::error!(\"{e}\");\n  }\n  loop {\n    sleep(Duration::from_secs(24 * 60 * 60));\n  }\n}","sourceCodeStart":426,"sourceCodeEnd":462,"githubUrl":"https://github.com/tauri-apps/tauri/blob/52e4b6e71d8632a7e648f866c442e287ecddee34/crates/tauri-cli/src/mobile/ios/mod.rs#L426-L462","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Install the iOS platform directly: `xcodebuild -downloadPlatform iOS` (or Xcode > Settings > Components > Get iOS platform).","Re-run the `tauri ios` command and answer Yes to the install prompt.","Verify the runtime is now present: `xcrun simctl list runtimes` should list an iOS runtime.","Ensure `xcode-select -p` points at full Xcode (e.g. /Applications/Xcode.app/Contents/Developer), not just CLT."],"exampleFix":"# before\nxcode-select -p\n# /Library/Developer/CommandLineTools  (no iOS platform)\ntauri ios dev\n# error: iOS platform not installed\n\n# after\nsudo xcode-select -s /Applications/Xcode.app/Contents/Developer\nxcodebuild -downloadPlatform iOS\ntauri ios dev","handlingStrategy":"validation","validationCode":"#!/usr/bin/env bash\n# Run before `tauri ios dev` / in CI setup\nif ! xcrun simctl list runtimes 2>/dev/null | grep -q '^iOS'; then\n  echo \"iOS runtime missing - installing\"\n  xcodebuild -downloadPlatform iOS\nfi","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Provision macOS build agents with `xcodebuild -downloadPlatform iOS` as a setup step.","Pre-install the iOS platform when setting up a new Mac/Xcode instead of relying on the CLI prompt.","In CI, avoid non-interactive runs until the runtime check passes."],"tags":["tauri-cli","ios","xcode","simulator","mobile","setup"],"backgroundTag":"missing-sdk-platform","analyzedSha":"52e4b6e71d8632a7e648f866c442e287ecddee34","analyzedAt":"2026-08-20T13:59:20.734Z","schemaVersion":2},"datasetVersion":"2026-08-31T19:17:28.585Z"}