Auto-Mount Metal Toolchain Using a Launch Service Because Xcode 26 Cannot

Xcode 26 introduced a bug where for some people, me included, Metal shaders won’t compile because the Metal toolchain won’t be managed by Xcode properly, no matter how often you reinstall the toolchain. Some fixes include moving the toolchain into a folder Xcode can see without having to mount anything. Others replace the ExportMetadata.plist exposed version.

I can fix this by mounting the Metal toolchain’s disk image manually. That sucks, but doesn’t break on every update of Xcode or Metal and doesn’t require any fiddling with the files or finding out the expected version string.

So that I don’t forget to do this after rebooting, I wrote a Launch Service that does this after reboot, when /Volumes/ changes, and every 5min for good measure :)

The code: https://codeberg.org/ctietze/metal-toolchain-launchd-automount

If you’re not comfortable fiddling with Launch Services/launchd, the repo includes basic shell scripts to install/uninstall the service for you.