From 9e9a54dea26ae66de63800cabbccf980902a1cd3 Mon Sep 17 00:00:00 2001 From: Lucas Fernandes Nogueira Date: Mon, 31 Aug 2026 08:54:52 -0300 Subject: [PATCH 1/2] fix: support iOS 27 development using Xcode 27 (#15890) * fix: support iOS 27 development using Xcode 27 * pin swift-rs to 1.0.8 * fix doc * fix doc * do not UIApplicationSupportsMultipleScenes by default * update tao * update example * update schemas * fix windows build --- .changes/ios-27.md | 6 ++ .changes/swift-27.md | 6 ++ .changes/xcode-27.md | 6 ++ Cargo.lock | 102 ++++++++++++++---- crates/tauri-cli/Cargo.toml | 2 +- crates/tauri-cli/config.schema.json | 8 +- .../templates/app/src-tauri/src/lib.rs | 5 +- .../templates/mobile/ios/project.yml | 5 + crates/tauri-runtime-wry/Cargo.toml | 10 +- .../schemas/config.schema.json | 8 +- crates/tauri-utils/Cargo.toml | 2 +- crates/tauri-utils/src/config.rs | 4 +- crates/tauri/Cargo.toml | 2 +- examples/api/src-tauri/Info.plist | 7 ++ 14 files changed, 137 insertions(+), 36 deletions(-) create mode 100644 .changes/ios-27.md create mode 100644 .changes/swift-27.md create mode 100644 .changes/xcode-27.md diff --git a/.changes/ios-27.md b/.changes/ios-27.md new file mode 100644 index 000000000000..d868081af6ed --- /dev/null +++ b/.changes/ios-27.md @@ -0,0 +1,6 @@ +--- +tauri-cli: minor:deps +"@tauri-apps/cli": minor:deps +--- + +Enable scenes lifecycle by default to support iOS 27. diff --git a/.changes/swift-27.md b/.changes/swift-27.md new file mode 100644 index 000000000000..f1e6593358ac --- /dev/null +++ b/.changes/swift-27.md @@ -0,0 +1,6 @@ +--- +tauri: minor:deps +tauri-utils: minor:deps +--- + +Update swift-rs to support builds using Xcode 27. diff --git a/.changes/xcode-27.md b/.changes/xcode-27.md new file mode 100644 index 000000000000..7dc131305062 --- /dev/null +++ b/.changes/xcode-27.md @@ -0,0 +1,6 @@ +--- +tauri-cli: minor:deps +"@tauri-apps/cli": minor:deps +--- + +Update cargo-mobile2 and change the default minimum iOS version to 15.0 to support Xcode 27. diff --git a/Cargo.lock b/Cargo.lock index 3dadfec3ca89..9d62d961a75d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1044,16 +1044,15 @@ dependencies = [ [[package]] name = "cargo-mobile2" -version = "0.22.4" +version = "0.22.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "caa0060b6b7e1c0f14312c8ccebf28f5713b3045ffaae033a180622122a361dc" +checksum = "102aeef2cc62bb7b6c7a901b8f5169cc8c58f27a0b4b4098a84a427ba825ae46" dependencies = [ "colored 2.2.0", "core-foundation 0.10.0", "deunicode", "duct", "dunce", - "embed-resource", "english-numbers", "freedesktop_entry_parser", "handlebars", @@ -1316,7 +1315,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "117725a109d387c937a1533ce01b450cbde6b88abceea8473c4d7a85853cda3c" dependencies = [ "lazy_static", - "windows-sys 0.48.0", + "windows-sys 0.59.0", ] [[package]] @@ -1325,7 +1324,7 @@ version = "3.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "faf9468729b8cbcea668e36183cb69d317348c2e08e994829fb56ebfdfbaac34" dependencies = [ - "windows-sys 0.48.0", + "windows-sys 0.61.2", ] [[package]] @@ -5575,7 +5574,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7d8fae84b431384b68627d0f9b3b1245fcf9f46f6c0e3dc902e9dce64edd1967" dependencies = [ "libc", - "windows-sys 0.48.0", + "windows-sys 0.61.2", ] [[package]] @@ -6029,7 +6028,7 @@ dependencies = [ "aes-gcm", "aes-kw", "argon2", - "base64 0.21.7", + "base64 0.22.1", "bitfield", "block-padding", "blowfish", @@ -6711,7 +6710,7 @@ dependencies = [ "once_cell", "socket2 0.6.1", "tracing", - "windows-sys 0.59.0", + "windows-sys 0.60.2", ] [[package]] @@ -8297,7 +8296,7 @@ version = "0.8.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c1c97747dbf44bb1ca44a561ece23508e99cb592e862f22222dcf42f51d1e451" dependencies = [ - "heck 0.4.1", + "heck 0.5.0", "proc-macro2", "quote", "syn 2.0.117", @@ -8682,9 +8681,9 @@ dependencies = [ [[package]] name = "swift-rs" -version = "1.0.7" +version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4057c98e2e852d51fdcfca832aac7b571f6b351ad159f9eda5db1655f8d0c4d7" +checksum = "e45c444e496845d3f2a351146bff59aae4975b2280238df1dfaa0c7d1846f38e" dependencies = [ "base64 0.21.7", "serde", @@ -8761,9 +8760,9 @@ dependencies = [ [[package]] name = "tao" -version = "0.36.0" +version = "0.37.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9fa4618f999c4249db1681cba0a19b890718f274de7fa93c445d46bd3a8a999" +checksum = "5d12c8607b01516c5d4a37e471a9cfb40b4a25cebce8fecbc6a559e125e51b6b" dependencies = [ "bitflags 2.13.0", "block2 0.6.2", @@ -8794,8 +8793,8 @@ dependencies = [ "tao-macros", "unicode-segmentation", "url", - "windows 0.61.1", - "windows-core 0.61.0", + "windows 0.62.0", + "windows-core 0.62.0", "windows-version", "x11-dl", ] @@ -10612,7 +10611,7 @@ version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" dependencies = [ - "windows-sys 0.48.0", + "windows-sys 0.59.0", ] [[package]] @@ -10652,11 +10651,24 @@ version = "0.61.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c5ee8f3d025738cb02bad7868bbb5f8a6327501e870bf51f1b455b0a2454a419" dependencies = [ - "windows-collections", + "windows-collections 0.2.0", "windows-core 0.61.0", - "windows-future", + "windows-future 0.2.0", "windows-link 0.1.1", - "windows-numerics", + "windows-numerics 0.2.0", +] + +[[package]] +name = "windows" +version = "0.62.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9579d0e6970fd5250aa29aba5994052385ff55cf7b28a059e484bb79ea842e42" +dependencies = [ + "windows-collections 0.3.0", + "windows-core 0.62.0", + "windows-future 0.3.0", + "windows-link 0.2.1", + "windows-numerics 0.3.0", ] [[package]] @@ -10668,6 +10680,15 @@ dependencies = [ "windows-core 0.61.0", ] +[[package]] +name = "windows-collections" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a90dd7a7b86859ec4cdf864658b311545ef19dbcf17a672b52ab7cefe80c336f" +dependencies = [ + "windows-core 0.62.0", +] + [[package]] name = "windows-core" version = "0.52.0" @@ -10690,6 +10711,19 @@ dependencies = [ "windows-strings 0.4.0", ] +[[package]] +name = "windows-core" +version = "0.62.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57fe7168f7de578d2d8a05b07fd61870d2e73b4020e9f49aa00da8471723497c" +dependencies = [ + "windows-implement", + "windows-interface", + "windows-link 0.2.1", + "windows-result 0.4.1", + "windows-strings 0.5.1", +] + [[package]] name = "windows-future" version = "0.2.0" @@ -10700,6 +10734,17 @@ dependencies = [ "windows-link 0.1.1", ] +[[package]] +name = "windows-future" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2194dee901458cb79e1148a4e9aac2b164cc95fa431891e7b296ff0b2f1d8a6" +dependencies = [ + "windows-core 0.62.0", + "windows-link 0.2.1", + "windows-threading", +] + [[package]] name = "windows-implement" version = "0.60.0" @@ -10744,6 +10789,16 @@ dependencies = [ "windows-link 0.1.1", ] +[[package]] +name = "windows-numerics" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2ce3498fe0aba81e62e477408383196b4b0363db5e0c27646f932676283b43d8" +dependencies = [ + "windows-core 0.62.0", + "windows-link 0.2.1", +] + [[package]] name = "windows-registry" version = "0.6.1" @@ -10907,6 +10962,15 @@ dependencies = [ "windows_x86_64_msvc 0.53.0", ] +[[package]] +name = "windows-threading" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3949bd5b99cafdf1c7ca86b43ca564028dfe27d66958f2470940f73d86d75b37" +dependencies = [ + "windows-link 0.2.1", +] + [[package]] name = "windows-version" version = "0.1.2" diff --git a/crates/tauri-cli/Cargo.toml b/crates/tauri-cli/Cargo.toml index 91d519608149..5e272a843e1b 100644 --- a/crates/tauri-cli/Cargo.toml +++ b/crates/tauri-cli/Cargo.toml @@ -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.22.4", default-features = false } +cargo-mobile2 = { version = "0.22.5", default-features = false } [dependencies] jsonrpsee = { version = "0.26", features = ["server"] } diff --git a/crates/tauri-cli/config.schema.json b/crates/tauri-cli/config.schema.json index 8878f5f19e24..ab5fa82f544b 100644 --- a/crates/tauri-cli/config.schema.json +++ b/crates/tauri-cli/config.schema.json @@ -92,7 +92,7 @@ }, "createUpdaterArtifacts": false, "iOS": { - "minimumSystemVersion": "14.0" + "minimumSystemVersion": "15.0" }, "icon": [], "linux": { @@ -2338,7 +2338,7 @@ "iOS": { "description": "iOS configuration.", "default": { - "minimumSystemVersion": "14.0" + "minimumSystemVersion": "15.0" }, "allOf": [ { @@ -3923,8 +3923,8 @@ ] }, "minimumSystemVersion": { - "description": "A version string indicating the minimum iOS version that the bundled application supports. Defaults to `13.0`.\n\n Maps to the IPHONEOS_DEPLOYMENT_TARGET value.", - "default": "14.0", + "description": "A version string indicating the minimum iOS version that the bundled application supports. Defaults to `15.0`.\n\n Maps to the IPHONEOS_DEPLOYMENT_TARGET value.", + "default": "15.0", "type": "string" }, "infoPlist": { diff --git a/crates/tauri-cli/templates/app/src-tauri/src/lib.rs b/crates/tauri-cli/templates/app/src-tauri/src/lib.rs index 9c3118c5d49e..630a056b9ea4 100644 --- a/crates/tauri-cli/templates/app/src-tauri/src/lib.rs +++ b/crates/tauri-cli/templates/app/src-tauri/src/lib.rs @@ -1,5 +1,8 @@ #[cfg_attr(mobile, tauri::mobile_entry_point)] pub fn run() { + #[cfg(target_os = "ios")] + let mut requested_scenes = 0u32; + tauri::Builder::default() .setup(|app| { if cfg!(debug_assertions) { @@ -12,5 +15,5 @@ pub fn run() { Ok(()) }) .run(tauri::generate_context!()) - .expect("error while running tauri application"); + .expect("error while building tauri application"); } diff --git a/crates/tauri-cli/templates/mobile/ios/project.yml b/crates/tauri-cli/templates/mobile/ios/project.yml index c23c1949e33d..067f282e8f37 100644 --- a/crates/tauri-cli/templates/mobile/ios/project.yml +++ b/crates/tauri-cli/templates/mobile/ios/project.yml @@ -33,7 +33,12 @@ targets: sources: - path: Sources - path: Assets.xcassets + # Exclude built static libs: regenerating with xcodegen after a build + # otherwise turns the per-configuration libapp.a copies into colliding + # resources ("Multiple commands produce …/libapp.a"). They are linked + # via LIBRARY_SEARCH_PATHS, never bundled as resources. - path: Externals + excludes: ["**/*.a"] - path: {{app.name}}_iOS - path: {{app.asset-dir}} buildPhase: resources diff --git a/crates/tauri-runtime-wry/Cargo.toml b/crates/tauri-runtime-wry/Cargo.toml index 903a7a8d7c1c..dfe81c5e6247 100644 --- a/crates/tauri-runtime-wry/Cargo.toml +++ b/crates/tauri-runtime-wry/Cargo.toml @@ -17,7 +17,7 @@ wry = { version = "0.56.0", default-features = false, features = [ "os-webview", "linux-body", ] } -tao = { version = "0.36.0", default-features = false, features = ["rwh_06"] } +tao = { version = "0.37.0", default-features = false, features = ["rwh_06"] } tauri-runtime = { workspace = true } tauri-utils = { workspace = true } raw-window-handle = "0.6" @@ -33,7 +33,11 @@ once_cell = "1.20" [target."cfg(windows)".dependencies.windows] version = "0.61" -features = ["Win32_Foundation", "Win32_Graphics_Dwm"] +features = [ + "Win32_Foundation", + "Win32_Graphics_Dwm", + "Win32_UI_WindowsAndMessaging", +] [target."cfg(any(target_os = \"linux\", target_os = \"dragonfly\", target_os = \"freebsd\", target_os = \"openbsd\", target_os = \"netbsd\"))".dependencies] gtk = { version = "0.18", features = ["v3_24"] } @@ -67,5 +71,5 @@ objc-exception = [] tracing = ["dep:tracing", "wry/tracing"] macos-proxy = ["wry/mac-proxy"] unstable = [] -common-controls-v6 = [] +common-controls-v6 = ["windows/Win32_UI_Controls", "windows/Win32_UI_Shell"] dbus = ["tao/dbus"] diff --git a/crates/tauri-schema-generator/schemas/config.schema.json b/crates/tauri-schema-generator/schemas/config.schema.json index 8878f5f19e24..ab5fa82f544b 100644 --- a/crates/tauri-schema-generator/schemas/config.schema.json +++ b/crates/tauri-schema-generator/schemas/config.schema.json @@ -92,7 +92,7 @@ }, "createUpdaterArtifacts": false, "iOS": { - "minimumSystemVersion": "14.0" + "minimumSystemVersion": "15.0" }, "icon": [], "linux": { @@ -2338,7 +2338,7 @@ "iOS": { "description": "iOS configuration.", "default": { - "minimumSystemVersion": "14.0" + "minimumSystemVersion": "15.0" }, "allOf": [ { @@ -3923,8 +3923,8 @@ ] }, "minimumSystemVersion": { - "description": "A version string indicating the minimum iOS version that the bundled application supports. Defaults to `13.0`.\n\n Maps to the IPHONEOS_DEPLOYMENT_TARGET value.", - "default": "14.0", + "description": "A version string indicating the minimum iOS version that the bundled application supports. Defaults to `15.0`.\n\n Maps to the IPHONEOS_DEPLOYMENT_TARGET value.", + "default": "15.0", "type": "string" }, "infoPlist": { diff --git a/crates/tauri-utils/Cargo.toml b/crates/tauri-utils/Cargo.toml index e783f2973c6d..20d53bbcd168 100644 --- a/crates/tauri-utils/Cargo.toml +++ b/crates/tauri-utils/Cargo.toml @@ -55,7 +55,7 @@ http = "1" plist = "1" [target."cfg(target_os = \"macos\")".dependencies] -swift-rs = { version = "1", optional = true, features = ["build"] } +swift-rs = { version = "1.0.8", optional = true, features = ["build"] } [dev-dependencies] getrandom = { version = "0.3", features = ["std"] } diff --git a/crates/tauri-utils/src/config.rs b/crates/tauri-utils/src/config.rs index de53d928cea1..4bbb48c48be3 100644 --- a/crates/tauri-utils/src/config.rs +++ b/crates/tauri-utils/src/config.rs @@ -693,7 +693,7 @@ fn macos_minimum_system_version() -> Option { } fn ios_minimum_system_version() -> String { - "14.0".into() + "15.0".into() } /// Configuration for a target language for the WiX build. @@ -3304,7 +3304,7 @@ pub struct IosConfig { /// Translates to the bundle's CFBundleVersion property. #[serde(alias = "bundle-version")] pub bundle_version: Option, - /// A version string indicating the minimum iOS version that the bundled application supports. Defaults to `13.0`. + /// A version string indicating the minimum iOS version that the bundled application supports. Defaults to `15.0`. /// /// Maps to the IPHONEOS_DEPLOYMENT_TARGET value. #[serde( diff --git a/crates/tauri/Cargo.toml b/crates/tauri/Cargo.toml index c2173c8bfbdb..6d39a14f26fc 100644 --- a/crates/tauri/Cargo.toml +++ b/crates/tauri/Cargo.toml @@ -157,7 +157,7 @@ jni = "0.21" # UIKit, i.e. iOS/tvOS/watchOS/visionOS [target.'cfg(all(target_vendor = "apple", not(target_os = "macos")))'.dependencies] libc = "0.2" -swift-rs = "1" +swift-rs = "1.0.8" objc2-ui-kit = { version = "0.3.2", default-features = false, features = [ "UIApplication", "UIResponder", diff --git a/examples/api/src-tauri/Info.plist b/examples/api/src-tauri/Info.plist index fe253ec7ba00..3c54d6f06dd0 100644 --- a/examples/api/src-tauri/Info.plist +++ b/examples/api/src-tauri/Info.plist @@ -6,5 +6,12 @@ Request camera access for WebRTC NSMicrophoneUsageDescription Request microphone access for WebRTC + UIApplicationSceneManifest + + UIApplicationSupportsMultipleScenes + + UISceneConfigurations + + From ad0b98a2329e369364e81e6315824255cbd681f7 Mon Sep 17 00:00:00 2001 From: Lucas Nogueira Date: Mon, 31 Aug 2026 08:56:31 -0300 Subject: [PATCH 2/2] chore: remove unused variable --- crates/tauri-cli/templates/app/src-tauri/src/lib.rs | 3 --- 1 file changed, 3 deletions(-) diff --git a/crates/tauri-cli/templates/app/src-tauri/src/lib.rs b/crates/tauri-cli/templates/app/src-tauri/src/lib.rs index 630a056b9ea4..a650cf5fe526 100644 --- a/crates/tauri-cli/templates/app/src-tauri/src/lib.rs +++ b/crates/tauri-cli/templates/app/src-tauri/src/lib.rs @@ -1,8 +1,5 @@ #[cfg_attr(mobile, tauri::mobile_entry_point)] pub fn run() { - #[cfg(target_os = "ios")] - let mut requested_scenes = 0u32; - tauri::Builder::default() .setup(|app| { if cfg!(debug_assertions) {