Building visionOS app with Firebase Source Distribution in Xcode Cloud

I have a working Xcode Cloud setup for my iOS and macOS targets, and I'm trying to add visionOS support. The issue is that Firebase requires using their source distribution for visionOS (instead of their default binary distribution).

Locally, this works by launching Xcode with:

open -a Xcode --env FIREBASE_SOURCE_FIRESTORE project.xcodeproj

For Xcode Cloud, I've added a ci_post_clone.sh script that sets this environment variable for visionOS builds:

#!/bin/bash

if [[ $CI_PRODUCT_PLATFORM == "xrOS" ]]; then
    echo "Running setup for visionOS..."
    export FIREBASE_SOURCE_FIRESTORE=1
fi

However, I'm getting the following error during build:

an out-of-date resolved file was detected at /.../project.xcworkspace/xcshareddata/swiftpm/Package.resolved, which is not allowed when automatic dependency resolution is disabled

So since setting FIREBASE_SOURCE_FIRESTORE=1 changes which SPM dependencies are required:

  • Normal setup uses: abseil-cpp-binary, grpc-binary
  • Source distribution needs: abseil-cpp-swiftpm, grpc-ios, boringssl-swiftpm

What's the recommended way to handle this in Xcode Cloud when maintaining builds for all platforms? Should I be using separate workflows with different branches for different platforms? Or is there a better approach?

System:

  • Xcode 16.2
  • Using SPM for dependency management
  • Firebase iOS SDK 10.29.0
  • Building for iOS, macOS, and visionOS

Thanks in advance for any guidance!

Building visionOS app with Firebase Source Distribution in Xcode Cloud
 
 
Q