Search code examples
xcode15xcode-cloudswift-macro

How do I trust a swift macro target for Xcode Cloud builds?


I just added my first Xcode 15, Swift 5.9 macro from an open source package that I'm referencing via Swift Package Manager. The first time I compiled locally, I had to trust the macro's package via a dialog box, which is fine for a local build. However, now my app doesn't build on Xcode Cloud, with the error "Target must be enabled before it can be used."

How do I tell Xcode Cloud to trust the macro's target?


Solution

  • I ran into same problem, and quickly discovered an additional defaults key that bypasses macro validation (same as -skipMacroValidation xcodebuild command line option):

    defaults write com.apple.dt.Xcode IDESkipMacroFingerprintValidation -bool YES