realitytool requires Metal for this operation and it is not available in this build environment

Hello,

I'm getting started for my project with Xcode Cloud since I upgraded to the macOS Sequioa Beta and Xcode 16 now refuses to archive builds for TestFlight.

Somewhere very late in the build process I get the following error:

realitytool requires Metal for this operation and it is not available in this build environment

The log says this happens at:

Compile Skybox urban.skybox

My project uses RealityKit. How can I fix this issue?

Thanks!

Feedback ID: FB15081450

I have the same issue. The use of Metal for my project had to deal with "compiling" an exr skybox file. The workaround is to generate a the compiled skybox file locally (a realityenv file) and check that into your repo. My workaround has a "Run Script" in Xcode right after the compile source phase to do this step and an Xcode Cloud Environment Variable called XCODE_CLOUD.

if [ "$XCODE_CLOUD" = "true" ]; then
  exit 0
fi

$DEVELOPER_BIN_DIR/realitytool compile --platform iphoneos --deployment-target 18.0 -o=$PROJECT_DIR/MyProject $PROJECT_DIR/Source/MySkybox.skybox

Okay great, devforums threw away my post when trying to reply here... Trying again.

I'm getting this error too and it's super frustrating. If I could pay for GPU instances, or if I could provide my own hardware to Xcode Cloud, then this wouldn't be an issue. But now this is forcing me off of Xcode Cloud, since there's no way for it to build my project on it.

Anybody else found any workarounds? I don't think I can apply msanford's trick, since it's failing generically on my rkassets bundle and won't even tell me which asset requires GPU to compile.

I encountered this same problem, but like @nevyn reported, the Xcode Cloud error referenced my RealityKit assets bundle as a whole, and not a skybox specifically.

I discovered that the cause of the error was an ImageBasedLightComponent I had defined in my Reality Composer Pro project. My ImageBasedLightComponent was referencing a PNG file, not an HDR file. I still saw the error even after removing the PNG file reference entirely.

I removed the ImageBasedLightComponent and created my ImageBasedLightComponent in code instead.

After making that change, I was able to successfully deploy my app using Xcode Cloud, and I no longer saw the "realitytool requires Metal for this operation and it is not available in this build environment" error message.

realitytool requires Metal for this operation and it is not available in this build environment
 
 
Q