One Xcode project, different SDKs for different architectures

Hi,

Is it possible to build for different versions of the SDK for different architectures in the same Xcode project? Our x86_64 users only require 10.10, but obviously Apple Silicon requires a much more modern SDK than that. The non-Xcode libraries we build separately, and some of those have -mmacos_min_version=10.10 so Xcode naturally complains when it comes to link (and it looks like it's having some trouble with missing symbols, but I've yet to narrow that down).

It's a bit of a long shot I know, but thought I'd ask before I investigate other avenues e.g. two separate Xcode projects, then lipo them together somehow (sounds like a signing nightmare).

Our motivation is just not to have users on much older hardware (which is still fine to run our program) having to upgrade macOS to work. I'm not 100% sure if this is even possible.

Thanks, James.

You don't need to use multiple SDKs. You can use the latest SDK and support older OS versions. If you want to support macOS 10.10, set the deployment target to 10.10. You have to be careful to avoid using anything Apple introduced in later OS versions. For example to using SwiftUI in a Mac app will not allow the app to run on anything earlier than 10.15.

Take a look at the following articles for more details:

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

https://www.swiftdevjournal.com/using-new-api-features-in-swift-while-supporting-older-os-versions/

One Xcode project, different SDKs for different architectures
 
 
Q