* refactor(tauri-cli): use OsString where possible
* refactor(tauri-cli): remove needless scoping blocks
* refactor(tauri-cli): make return type concrete
* refactor(tauri-cli): use ?
* refactor(tauri-cli): coerce later to trait object
* refactor(tauri-cli): remove clone
* refactor(tauri-cli): make better use of static OnceLock
* fix(tauri-cli): upgrade atomics to SeqCst
* Add change file
* Update .changes/change-pr-14836.md
Co-authored-by: Tony <68118705+Legend-Master@users.noreply.github.com>
* refactor(tauri-cli): introduce replacement functions
* refactor(tauri-cli): apply replacement to remove.rs
* refactor(tauri-cli): apply replacement to icon.rs
* refactor(tauri-cli): apply replacement to bundle.rs
* refactor(tauri-cli): apply replacement to build.rs
* refactor(tauri-cli): apply replacement to add.rs
* refactor(tauri-cli): apply replacement to dev.rs
* refactor(tauri-cli): less controlflow
* refactor(tauri-cli): split config loading from locking static
* refactor(tauri-cli): remove duplicate checks covered by if let Some(tauri_dir) = tauri_dir
tauri_dir.is_some() must be true, otherwise the entire block is not run, so the frontend_dir check
is irrelevant
* fmt
* refactor(tauri-cli): apply replacement to inspect.rs
* refactor(tauri-cli): dont use statics for config
* refactor(tauri-cli): finish threading directory paths through functions
* fix: clippy
* fixup CI
* refactor(tauri-cli): dont need mutex
* refactor(tauri-cli): rescope mutex use to minimal necessary
* fix CI, reduce mutex use
* fixup PR #14607
* fix: clippy
* refactor(tauri-cli): remove ConfigHandle
* refactor(tauri-cli): remove more unwraps and panicing functions
* refactor(tauri-cli): less mutexes
* refactor(tauri-cli): undo mistaken change, address review comment
* Split android build to 2 functions
* Pass in dirs to migration v1 like the v2 beta
* Add change file
---------
Co-authored-by: Tony <legendmastertony@gmail.com>
* refactor: use empty vector for features instead of None
* refactor: reorder
* add change file
* comment: highlight places where serialization is used
* refactor: simplify serialization
* Update .changes/empty-vec-instead-of-none.md
* Update crates/tauri-cli/src/mobile/ios/mod.rs
---------
Co-authored-by: Tony <68118705+Legend-Master@users.noreply.github.com>
currently we only install Rust targets for mobile when initializing the projects.
Users can commit the Android/iOS projects, so running the init command is not a requirement to develop mobile apps. This change ensures the Rust targets are installed before trying to compile them.
* fix(cli): read original identifier to fix mobile options reading
the iOS and Android CLI commands leverage an android_studio_script/xcode_script that is executed by the native IDE or build tool. This script reads the Tauri configuration to find the app identifier used to communicate with the parent Tauri CLI process to read CLI options.
The communication is broken when the `--config` arg is used, since the IDE script does not have access to that value before reaching the parent process, which is impossible without knowing the actual identifier used.
To bypass this we'll agree on using the original identifier. This obviously won't work if the original tauri.conf.json do not have an identifier, so we error out in this case
* fix build, lint
* fix(cli): iOS dev broken on Xcode 16.3, closes#13128
Looks like we cannot use the arm64-sim custom architecture on Xcode 16.3, as it incorrectly appends the -sim suffix on some clang build scripts which ends up with an invalid target triple.
Currently we do not have automation to update Xcode/Android projects, so a manual intervention is required by our users, either recreating the project or modifying it manually (the arm64-sim arch must be removed and all its references).
ref https://github.com/tauri-apps/cargo-mobile2/pull/445
* fix dev on macOS with intel chip
* feat(cli): allow merging multiple configuration values
Currently the dev/build/bundle commands can only merge a single Tauri configuration value (file or raw JSON string), which imposes a limitation in scenarios where you need more flexibility (like multiple app flavors and environments). This changes the config CLI option to allow multiple values, letting you merge multiple Tauri config files with the main one.
* fix ios build
- the Xcode project now uses a fixed output library name, which means changes to the Cargo.toml lib name won't affect it (backwards compatible change, we're checking if this new format is being used or not by reading the project.pbxproj)
- sync config identifier with the pbxproj
- sync development team config with the pbxproj
the sync runs both on dev and on build
Co-authored-by: Amr Bashir <amr.bashir2015@gmail.com>