Parveen Kaler
Parveen Kaler

Reputation: 158

xcodebuild uses different configuration than building from within Xcode

At the command line, xcodebuild gives different results than building from within the Xcode UI.

Here is the command line that I pass:

$ xcodebuild -sdk iphonesimulator5.0 -configuration Release -scheme mylib -target mylib

It may be important to note that the target is set to create a static library file.

I know that different settings are being used because I have -Wundeclared-selector toggled off in the project file. However, I get these warnings when running xcodebuild from the command line.

It seems that others are also having this problem: Why does xcodebuild give different build results than XCode UI

Upvotes: 4

Views: 911

Answers (1)

Parveen Kaler
Parveen Kaler

Reputation: 158

I had multiple versions of Xcode installed on my machine. This fixed it:

$ sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer/

Upvotes: 5

Related Questions