Xcode 7.1.1 There is no SDK with the name or path macosx10.9

Anyone else seeing this? I have an Xcode project which builds a code bundle. Inside XCode, the debug build works fine. However, when using the xcodebuild command line to build my Release target, I’m getting the following:

 cd /path/to/my/project ; xcodebuild -project MyProject.xcodeproj -target MyTarget -configuration Release 

=== BUILD TARGET MyTarget OF PROJECT MyProject WITH CONFIGURATION Release ===

Check dependencies
error: There is no SDK with the name or path '/path/to/my/project/macosx10.9'

I have triple-checked my project and nowhere inside it do I refer to 10.9 SDK. My base SDK is set to “Latest OS X (OS X 10.11)”.

I’m running on 10.10.5 if that matters.

This all worked fine in earlier versions of XCode 7, so I’m thinking this may be some sort of weird XCode bug?

Update: i poked around inside the Xcode project file itself, and indeed there were still references to 10.9, like this:

				SDKROOT = macosx;
				"SDKROOT[arch=*]" = macosx10.9;
				"SDKROOT[arch=i386]" = macosx10.9;
				"SDKROOT[arch=x86_64]" = macosx10.9;

Even though these values did not show up anywhere inside the XCode app itself when I was looking at my project.

I ended up just manually deleting these three lines:

				"SDKROOT[arch=*]" = macosx10.9;
				"SDKROOT[arch=i386]" = macosx10.9;
				"SDKROOT[arch=x86_64]" = macosx10.9;

And now it works fine. Seems like an XCode bug to me.

I switched all projects to use latest SDK, whatever current version is.