{"record":{"id":"14e6a0f82bc1b4b2","repo":"tauri-apps/tauri","slug":"library-from-does-not-include-required-runtime-14e6a0","errorCode":null,"errorMessage":"Library from {} does not include required runtime symbols. This means you are likely missing the tauri::mobile_entry_point macro usage, see the documentation for more information: https://v2.tauri.app/start/migrate/from-tauri-1","messagePattern":"Library from (.+?) does not include required runtime symbols\\. This means you are likely missing the tauri::mobile_entry_point macro usage, see the documentation for more information: https://v2\\.tauri\\.app/start/migrate/from-tauri-1","errorType":"exception","errorClass":"tauri_cli::error::Error","httpStatus":null,"severity":"critical","filePath":"crates/tauri-cli/src/mobile/ios/xcode_script.rs","lineNumber":345,"sourceCode":"    let mut obj_bytes = Vec::new();\n    entry\n      .read_to_end(&mut obj_bytes)\n      .fs_context(\"failed to read mobile lib entry\", path.to_path_buf())?;\n\n    let file = object::File::parse(&*obj_bytes)\n      .map_err(std::io::Error::other)\n      .fs_context(\"failed to parse mobile lib entry\", path.to_path_buf())?;\n    for symbol in file.symbols() {\n      let Ok(name) = symbol.name() else {\n        continue;\n      };\n      if name.contains(\"start_app\") {\n        return Ok(());\n      }\n    }\n  }\n\n  crate::error::bail!(\n    \"Library from {} does not include required runtime symbols. This means you are likely missing the tauri::mobile_entry_point macro usage, see the documentation for more information: https://v2.tauri.app/start/migrate/from-tauri-1\",\n    path.display()\n  )\n}\n","sourceCodeStart":327,"sourceCodeEnd":350,"githubUrl":"https://github.com/tauri-apps/tauri/blob/52e4b6e71d8632a7e648f866c442e287ecddee34/crates/tauri-cli/src/mobile/ios/xcode_script.rs#L327-L350","documentation":"`validate_lib` opens the produced static library and scans its symbols for one containing `start_app` — the marker emitted by the `#[cfg_attr(mobile, tauri::mobile_entry_point)]` macro. If no such symbol exists, the Rust library cannot boot the Tauri runtime on iOS, so the Xcode build is stopped with a migration hint.","triggerScenarios":"The app's `main` is not annotated with `tauri::mobile_entry_point` (only the desktop `fn main` exists), the attribute is missing the `#[cfg_attr(mobile, ...)]` guard so it was compiled out, or the project was migrated from Tauri 1.x by hand without running the migration.","commonSituations":"Tauri 1 -> 2 migration where the entry point refactor was skipped; a new iOS target added to an existing desktop app; refactoring that moved `main` out of lib.rs and dropped the macro.","solutions":["Annotate your main function: `#[cfg_attr(mobile, tauri::mobile_entry_point)]` above `pub fn run()` in `src-tauri/src/lib.rs`, and call `run()` from `main.rs`.","Or run `tauri migrate` to apply the v1->v2 entry point changes automatically.","Verify the symbol landed: `nm -gU target/aarch64-apple-ios/debug/lib<name>.a | grep start_app`.","Clean and rebuild so the macro is actually expanded (`cargo clean` then rebuild in Xcode)."],"exampleFix":"// before (src-tauri/src/lib.rs)\npub fn run() {\n  tauri::Builder::default().run(tauri::generate_context!()).unwrap();\n}\n\n// after\n#[cfg_attr(mobile, tauri::mobile_entry_point)]\npub fn run() {\n  tauri::Builder::default().run(tauri::generate_context!()).unwrap();\n}\n// src-tauri/src/main.rs keeps: fn main() { myapp_lib::run() }","handlingStrategy":"validation","validationCode":"# Confirm the entry-point symbol before opening Xcode\nnm -gU src-tauri/target/aarch64-apple-ios/debug/lib*.a | grep -q start_app \\\n  && echo \"entry point ok\" || echo \"missing #[tauri::mobile_entry_point]\"","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use `tauri migrate` when upgrading 1.x projects so the entry point is refactored.","Keep the `#[cfg_attr(mobile, tauri::mobile_entry_point)]` line on run() in lib.rs.","After entry-point changes, cargo clean the ios target to force recompilation."],"tags":["tauri","ios","mobile-entry-point","migration","symbols","staticlib"],"backgroundTag":"missing-entry-point","analyzedSha":"52e4b6e71d8632a7e648f866c442e287ecddee34","analyzedAt":"2026-08-20T13:59:20.734Z","schemaVersion":2},"datasetVersion":"2026-08-31T22:30:34.772Z"}