Skip to content

fix(ios): fix build when Metal Toolchain exist in the system#14921

Merged
FabianLars merged 2 commits into
tauri-apps:devfrom
setoelkahfi:fix/ios-build-with-metaltoolchain-installed
Mar 20, 2026
Merged

fix(ios): fix build when Metal Toolchain exist in the system#14921
FabianLars merged 2 commits into
tauri-apps:devfrom
setoelkahfi:fix/ios-build-with-metaltoolchain-installed

Conversation

@setoelkahfi

@setoelkahfi setoelkahfi commented Feb 9, 2026

Copy link
Copy Markdown
Contributor

Fixes #14864

This pull request updates the way Swift library search paths are specified for iOS builds, ensuring they reference the correct Xcode toolchain location. The change replaces usage of the TOOLCHAIN_DIR variable with the explicit $(DEVELOPER_DIR)/Toolchains/XcodeDefault.xctoolchain path for both arm64 and x86_64 architectures. This adjustment fixes compatibility and reliability of iOS builds especially when MetalToolchain existed in the system.

Changes

Build configuration updates:

  • Updated LIBRARY_SEARCH_PATHS for arm64 and x86_64 architectures in crates/tauri-cli/templates/mobile/ios/project.yml to use $(DEVELOPER_DIR)/Toolchains/XcodeDefault.xctoolchain instead of $(TOOLCHAIN_DIR) for Swift libraries.

Test fixture alignment:

  • Updated LIBRARY_SEARCH_PATHS for arm64 and x86_64 in crates/tauri-cli/tests/fixtures/pbxproj/project.pbxproj to match the new toolchain path. [1] [2]
  • Adjusted snapshot files in crates/tauri-cli/tests/fixtures/pbxproj/snapshots/tauri_cli__helpers__pbxproj__tests__project-modified.pbxproj.snap and project.pbxproj.snap to reflect the new library search paths. [1] [2] [3] [4]

@setoelkahfi
setoelkahfi requested a review from a team as a code owner February 9, 2026 22:55
@github-actions

github-actions Bot commented Mar 7, 2026

Copy link
Copy Markdown
Contributor

Package Changes Through 12f1658

There are 6 changes which include tauri-macos-sign with patch, tauri with minor, tauri-bundler with patch, tauri-cli with patch, @tauri-apps/cli with patch, tauri-utils with patch

Planned Package Versions

The following package releases are the planned based on the context of changes in this pull request.

package current next
tauri-utils 2.8.3 2.8.4
tauri-macos-sign 2.3.3 2.3.4
tauri-bundler 2.8.1 2.8.2
tauri-runtime 2.10.1 2.10.2
tauri-runtime-wry 2.10.1 2.10.2
tauri-codegen 2.5.5 2.5.6
tauri-macros 2.5.5 2.5.6
tauri-plugin 2.5.4 2.5.5
tauri-build 2.5.6 2.5.7
tauri 2.10.3 2.11.0
@tauri-apps/cli 2.10.1 2.10.2
tauri-cli 2.10.1 2.10.2

Add another change file through the GitHub UI by following this link.


Read about change files or the docs at github.com/jbolda/covector

@setoelkahfi

Copy link
Copy Markdown
Contributor Author

Hi @lucasfernog — friendly bump on this one 🙂. The issue (#14864) is still easily reproducible on any Mac with the Metal Toolchain installed, and it completely blocks iOS builds. The fix is minimal (swapping $(TOOLCHAIN_DIR) for the explicit XcodeDefault.xctoolchain path) with tests already updated to match. Happy to address any feedback if needed!

Screenshot 2026-03-07 at 13 51 04

@FabianLars

Copy link
Copy Markdown
Member

it would be awesome if you could sign your commits and force push since we technically have branch protections set up enforcing this.

also, if you add a changefile i'll just merge this :)

@setoelkahfi
setoelkahfi force-pushed the fix/ios-build-with-metaltoolchain-installed branch from 51587d4 to cc2376d Compare March 19, 2026 18:27
@setoelkahfi
setoelkahfi force-pushed the fix/ios-build-with-metaltoolchain-installed branch from cc2376d to e962320 Compare March 19, 2026 18:39
@setoelkahfi

Copy link
Copy Markdown
Contributor Author

@FabianLars done :)

@FabianLars
FabianLars merged commit 80c1425 into tauri-apps:dev Mar 20, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[bug] MetalToolchain causing build error on iOS target

2 participants