# Ignore macro validation using xcodebuild command

**URL:** <https://forums.swift.org/t/ignore-macro-validation-using-xcodebuild-command/68125>\
**Category:** Using Swift\
**Created:** [October 28, 2023, 4:00pm UTC](https://forums.swift.org/t/ignore-macro-validation-using-xcodebuild-command/68125 "2023-10-28T16:00:58Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Muhammed9991](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/muhammed9991/32/24727_2.png) [@Muhammed9991](https://forums.swift.org/u/Muhammed9991)\
**Post date:** [October 28, 2023, 4:00pm UTC](https://forums.swift.org/t/ignore-macro-validation-using-xcodebuild-command/68125/1 "2023-10-28T16:00:58Z")

</div>

I'm coming across an issue when using macros from another package. When using a macro for the first time there is a manual validation process. When running my project in CI. I was getting this validation issue pop up saying

```bash
Target 'CasePathsMacros' must be enabled before it can be used.

```

Doing an initial search I came across this [answer](https://forums.swift.org/t/is-there-a-way-to-programmatically-allow-trust-the-compiler-plugin-to-run-from-the-command-line/65690/2). Which suggested using `-skipMacroValidation` xcodebuild command. Even after using this I am still getting the aforementioned error.

Has anyone else come across this yet? Any ideas how to fix this?

---

<div class="post-metadata">

**Author:** ![l-rushton](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/l-rushton/32/31017_2.png) [@l-rushton](https://forums.swift.org/u/l-rushton)\
**Post date:** [November 14, 2023, 8:49am UTC](https://forums.swift.org/t/ignore-macro-validation-using-xcodebuild-command/68125/2 "2023-11-14T08:49:41Z")

</div>

Having the same issue.

---

<div class="post-metadata">

**Author:** ![Raivis](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/raivis/32/32586_2.png) [@Raivis](https://forums.swift.org/u/Raivis)\
**Post date:** [November 14, 2023, 8:58am UTC](https://forums.swift.org/t/ignore-macro-validation-using-xcodebuild-command/68125/3 "2023-11-14T08:58:19Z")

</div>

Still battling the same issue...

---

<div class="post-metadata">

**Author:** ![Muhammed9991](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/muhammed9991/32/24727_2.png) [@Muhammed9991](https://forums.swift.org/u/Muhammed9991)\
**Post date:** [November 14, 2023, 10:06am UTC](https://forums.swift.org/t/ignore-macro-validation-using-xcodebuild-command/68125/4 "2023-11-14T10:06:09Z")

</div>

Only way I got it to work was to add a script to the CI which runs

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

```

This is done before the xcode build starts but the command line flag doesn’t work. Surely just using `-skipMacroValidation` should work.

Later down in the build I do end up getting issues now saying a particular macro does not exist anymore if I go with this approach. Even though everything is building fine locally.

---

<div class="post-metadata">

**Author:** ![Muhammed9991](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/muhammed9991/32/24727_2.png) [@Muhammed9991](https://forums.swift.org/u/Muhammed9991)\
**Post date:** [November 21, 2023, 9:34am UTC](https://forums.swift.org/t/ignore-macro-validation-using-xcodebuild-command/68125/5 "2023-11-21T09:34:14Z")

</div>

> [@Muhammed9991](#):
>
> skipMacroValidation

The build flag `skipMacroValidation` still not working for couple of people I spoke with. However, setting global settings for IDESkipMacroFingerprintValidation did work. The issue I raised where the macro couldn’t be found was due to us using a helper from Microsoft called [Xcode@5](https://learn.microsoft.com/en-us/azure/devops/pipelines/tasks/reference/xcode-v5?view=azure-pipelines). For some reason when ignoring macro validation then building using this helper, the macros could not be found.

For anyone using Azure for there CI. The work around was to invoke xcodebuild directly from command line and not use the helper
