Is there a way to programmatically allow (trust) the compiler plugin to run from the command line?

When I try to run code that uses a community-created macro library on CI (Xcode Cloud), it fails because I cannot interact with the compiler plugin to allow its use.

The error message looks like this:

Target 'PowerAssertPlugin' must be enabled before it can be used.

I have tried setting the following UserDefaults based on the following post but no effect.

defaults write com.apple.dt.Xcode IDESkipPackagePluginFingerprintValidation -bool YES
5 Likes

You can use defaults write com.apple.dt.Xcode IDESkipMacroFingerprintValidation -bool YES in a script to skip validation of macros from remote dependencies (the equivalent xcodebuild command line flag is -skipMacroValidation).

9 Likes

It works! Thank you so much.

Is there a way to explicitly set a specific list of macros that are validated instead of skipping validation for all of them? as the documentation of the option suggests this is a security risk:

-skipMacroValidation Skip validation of macros (this can be a security risk if they are not from trusted sources)

4 Likes