xcode-cloudxcode26

Xcode cloud 26 doesn't have metal toolchain installed?


So I'm setting up Xcode cloud workflows to build for iOS 26 (for testflight testing), but it doesn't seem to have the metal toolchain installed and refuses to build. Does anyone know how to install the metal toolchain to get this working?

I've successfully got cloud builds working for other apps, but they don't use metal. Notably, the exact same code compiles without issue on Xcode cloud 16.

The error message

The configuration


Solution

  • Update: I was able to fix it! Turns out this is a known issue with the Xcode 26 beta.

    To get it working, create a ci_scripts/ci_pre_xcodebuild.sh file in your project directory, and use the below script, replacing your-workflow-id with the workflow ID that is running the script (to ensure the script only runs on Xcode 26 builds):

    #!/bin/sh
    
    if [ "$CI_WORKFLOW_ID" = "your-workflow-id" ]; then
        xcodebuild -downloadComponent metalToolchain -exportPath /tmp/MyMetalExport/
        sed -i '' -e 's/17A5241c/17A5241e/g' /tmp/MyMetalExport/MetalToolchain-17A5241c.exportedBundle/ExportMetadata.plist
        xcodebuild -importComponent metalToolchain -importPath /tmp/MyMetalExport/MetalToolchain-17A5241c.exportedBundle
    fi