fix(cli): install iOS dependencies when needed (#13799)

currently deps are only installed on init, which might not be executed on someone's machine if the xcode project is commited to the repo. we need to ensure dependencies are installed before running them

applies https://github.com/tauri-apps/cargo-mobile2/pull/468
This commit is contained in:
Lucas Fernandes Nogueira
2025-07-10 10:17:23 -03:00
committed by GitHub
parent 4ba871c5d2
commit 0f248b111f
3 changed files with 112 additions and 23 deletions

View File

@@ -0,0 +1,6 @@
---
"tauri-cli": patch:bug
"@tauri-apps/cli": patch:bug
---
Install iOS dependencies when needed.

127
Cargo.lock generated
View File

@@ -1055,9 +1055,9 @@ dependencies = [
[[package]]
name = "cargo-mobile2"
version = "0.20.1"
version = "0.20.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "434467ff052dd826c6fdff94b96a74439190d5cdbd58d8e49519885c5a69c287"
checksum = "7f2e0347234eb5a7b47eb66d33dc18560a628f031dffe58c37a7efe44b53e6f9"
dependencies = [
"colored",
"core-foundation 0.10.0",
@@ -1083,9 +1083,9 @@ dependencies = [
"serde_json",
"textwrap",
"thiserror 2.0.12",
"toml",
"toml 0.9.0",
"ureq",
"which",
"which 8.0.0",
"windows 0.61.1",
"x509-certificate 0.24.0",
]
@@ -1120,7 +1120,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "02260d489095346e5cafd04dea8e8cb54d1d74fcd759022a9b72986ebe9a1257"
dependencies = [
"serde",
"toml",
"toml 0.8.19",
]
[[package]]
@@ -2182,7 +2182,7 @@ dependencies = [
"cc",
"memchr",
"rustc_version",
"toml",
"toml 0.8.19",
"vswhom",
"winreg 0.52.0",
]
@@ -2405,7 +2405,7 @@ dependencies = [
"atomic",
"pear",
"serde",
"toml",
"toml 0.8.19",
"uncased",
"version_check",
]
@@ -4332,6 +4332,12 @@ version = "0.4.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d26c52dbd32dccf2d10cac7725f8eae5296885fb5703b261f7d0a0739ec807ab"
[[package]]
name = "linux-raw-sys"
version = "0.9.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cd945864f07fe9f5371a27ad7b52a172b4b499999f1d97574c9fa68373937e12"
[[package]]
name = "litemap"
version = "0.7.4"
@@ -7063,6 +7069,19 @@ dependencies = [
"windows-sys 0.59.0",
]
[[package]]
name = "rustix"
version = "1.0.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c71e83d6afe7ff64890ec6b71d6a69bb8a610ab78ce364b3352876bb4c801266"
dependencies = [
"bitflags 2.7.0",
"errno",
"libc",
"linux-raw-sys 0.9.4",
"windows-sys 0.59.0",
]
[[package]]
name = "rustls"
version = "0.21.12"
@@ -7548,6 +7567,15 @@ dependencies = [
"serde",
]
[[package]]
name = "serde_spanned"
version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "40734c41988f7306bb04f0ecf60ec0f3f1caa34290e4e8ea471dcd3346483b83"
dependencies = [
"serde",
]
[[package]]
name = "serde_urlencoded"
version = "0.7.1"
@@ -8300,7 +8328,7 @@ dependencies = [
"cfg-expr",
"heck 0.5.0",
"pkg-config",
"toml",
"toml 0.8.19",
"version-compare",
]
@@ -8455,7 +8483,7 @@ dependencies = [
"tauri-codegen",
"tauri-utils",
"tauri-winres",
"toml",
"toml 0.8.19",
"walkdir",
]
@@ -8499,7 +8527,7 @@ dependencies = [
"url",
"uuid",
"walkdir",
"which",
"which 7.0.1",
"windows-registry 0.5.0",
"windows-sys 0.60.2",
"zip 4.0.0",
@@ -8575,7 +8603,7 @@ dependencies = [
"tauri-utils",
"tempfile",
"tokio",
"toml",
"toml 0.8.19",
"toml_edit 0.22.22",
"ureq",
"url",
@@ -8636,7 +8664,7 @@ dependencies = [
"signal-hook",
"signal-hook-tokio",
"tokio",
"which",
"which 7.0.1",
"win32job",
]
@@ -8704,7 +8732,7 @@ dependencies = [
"serde",
"serde_json",
"tauri-utils",
"toml",
"toml 0.8.19",
"walkdir",
]
@@ -8846,7 +8874,7 @@ dependencies = [
"serialize-to-javascript",
"swift-rs",
"thiserror 2.0.12",
"toml",
"toml 0.8.19",
"url",
"urlpattern",
"uuid",
@@ -8860,7 +8888,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "56eaa45f707bedf34d19312c26d350bc0f3c59a47e58e8adbeecdc850d2c13a0"
dependencies = [
"embed-resource",
"toml",
"toml 0.8.19",
]
[[package]]
@@ -9180,12 +9208,26 @@ name = "toml"
version = "0.8.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a1ed1f98e3fdc28d6d910e6737ae6ab1a93bf1985935a1193e68f93eeb68d24e"
dependencies = [
"serde",
"serde_spanned 0.6.8",
"toml_datetime 0.6.8",
"toml_edit 0.22.22",
]
[[package]]
name = "toml"
version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f271e09bde39ab52250160a67e88577e0559ad77e9085de6e9051a2c4353f8f8"
dependencies = [
"indexmap 2.7.0",
"serde",
"serde_spanned",
"toml_datetime",
"toml_edit 0.22.22",
"serde_spanned 1.0.0",
"toml_datetime 0.7.0",
"toml_parser",
"toml_writer",
"winnow 0.7.11",
]
[[package]]
@@ -9197,6 +9239,15 @@ dependencies = [
"serde",
]
[[package]]
name = "toml_datetime"
version = "0.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bade1c3e902f58d73d3f294cd7f20391c1cb2fbcb643b73566bc773971df91e3"
dependencies = [
"serde",
]
[[package]]
name = "toml_edit"
version = "0.19.15"
@@ -9204,7 +9255,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421"
dependencies = [
"indexmap 2.7.0",
"toml_datetime",
"toml_datetime 0.6.8",
"winnow 0.5.40",
]
@@ -9215,7 +9266,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "70f427fce4d84c72b5b732388bf4a9f4531b53f74e2887e3ecb2481f68f66d81"
dependencies = [
"indexmap 2.7.0",
"toml_datetime",
"toml_datetime 0.6.8",
"winnow 0.5.40",
]
@@ -9227,11 +9278,26 @@ checksum = "4ae48d6208a266e853d946088ed816055e556cc6028c5e8e2b84d9fa5dd7c7f5"
dependencies = [
"indexmap 2.7.0",
"serde",
"serde_spanned",
"toml_datetime",
"serde_spanned 0.6.8",
"toml_datetime 0.6.8",
"winnow 0.6.22",
]
[[package]]
name = "toml_parser"
version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b5c1c469eda89749d2230d8156a5969a69ffe0d6d01200581cdc6110674d293e"
dependencies = [
"winnow 0.7.11",
]
[[package]]
name = "toml_writer"
version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b679217f2848de74cabd3e8fc5e6d66f40b7da40f8e1954d92054d9010690fd5"
[[package]]
name = "tower"
version = "0.4.13"
@@ -10110,6 +10176,17 @@ dependencies = [
"winsafe",
]
[[package]]
name = "which"
version = "8.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d3fabb953106c3c8eea8306e4393700d7657561cb43122571b172bbfb7c7ba1d"
dependencies = [
"env_home",
"rustix 1.0.7",
"winsafe",
]
[[package]]
name = "widestring"
version = "1.1.0"
@@ -10656,6 +10733,12 @@ dependencies = [
"memchr",
]
[[package]]
name = "winnow"
version = "0.7.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "74c7b26e3480b707944fc872477815d29a8e429d2f93a1ce000f5fa84a15cbcd"
[[package]]
name = "winreg"
version = "0.50.0"

View File

@@ -36,7 +36,7 @@ name = "cargo-tauri"
path = "src/main.rs"
[target."cfg(any(target_os = \"linux\", target_os = \"dragonfly\", target_os = \"freebsd\", target_os = \"openbsd\", target_os = \"netbsd\", target_os = \"windows\", target_os = \"macos\"))".dependencies]
cargo-mobile2 = { version = "0.20", default-features = false }
cargo-mobile2 = { version = "0.20.2", default-features = false }
[dependencies]
jsonrpsee = { version = "0.24", features = ["server"] }