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

Replies

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

  • @durul yes, I've seen this post but it doesn't seem like it is solving my issue. I'm trying to manually build with a specific SDK by passing the SDK's absolute path to SDKROOT. This works with versions 14.3.1 and earlier. I tried passing in other SDK versions like macOS12.3.sdk but it isn't working either.

Add a Comment

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/

  • We require macos10.14 SDK to build our driver. Base SDK and Deployment Target are different. Setting the Deployment Target allows the app to run on the specified OS Version. Setting Base SDK allows us to build using a specific SDK. There are features in the macos10.14 SDK we require that aren't present in later ones.

Add a Comment

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.