0

When running xcodebuild for UIAutomation tests I'm getting a clang unknown argument error. There are plenty of solutions from similar issues how ever they don't work for me. Spicifically ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future does not solve the issue.

Here is the command I'm running:

xcodebuild -workspace myWorkspace.xcworkspace \
-scheme "myScheme" \
   -sdk iphonesimulator \
   -destination 'platform=iOS Simulator,OS=9.2,name=iPhone 6' \
   test

And the error:

clang: error: unknown argument: '-fYEScolor-diagnostics'

I'm running xcode 7.2.1 and OSX 10.11.1

andii
  • 175
  • 1
  • 10

1 Answers1

0

Turns out the solution is to add the argument OTHER_CFLAGS="-Qunused-arguments" to the xcodebuild command, eg:

xcodebuild OTHER_CFLAGS="-Qunused-arguments"-workspace myWorkspace.xcworkspace \
-scheme "myScheme" \
   -sdk iphonesimulator \
   -destination 'platform=iOS Simulator,OS=9.2,name=iPhone 6' \
   test
andii
  • 175
  • 1
  • 10