Xcode 15.0 using macOS 10.14 SDK as Base SDK

Upgrading to 15.0 Xcode introduces a build error

Command: xcodebuild build -configuration Release -arch x86_64 SDKROOT=<path to 10.14 sdk>/MacOSX.sdk

Error: error: failed to deserialize Info.plist task context: Deserialization failed: SDK lookup failed for canonical name: macosx10.14

Everything works fine when I use Xcode 14.3.1

Did you check this post? SDK Path wrong - https://developer.apple.com/forums/thread/77935

Why do you need to use the macOS 10.14 SDK?

If you want your app to run on macOS 10.14, set the deployment target for your app to 10.14, and you can use the macOS 14 SDK that ships with Xcode 15. By setting the deployment target to 10.14, your app will run on macOS 10.14 and above, assuming you aren't using any new technologies Apple added in later OS versions. Read the following article if you don't know how to change the deployment target.

https://www.swiftdevjournal.com/supporting-older-versions-of-ios-and-macos/

Our solution is to install two copies of Xcode, version 15 and version 14.3.1. The older version is located at "/Applications/Xcode_14.3.1.app".

Then the build script can just set the environment variable on the command line which causes xcodebuild:

env DEVELOPER_DIR="/Applications/Xcode_14.3.1.app/Contents/Developer" xcrun xcodebuild build -configuration .........

This avoids the need for root access (which xcode-select requires) as well as ensuring that the older developer tools are only used for this one build step.

Xcode 15.0 using macOS 10.14 SDK as Base SDK
 
 
Q