Can SwiftPM not default to low macOS versions?

The minimum deployment target today is really coming from the SDK. Right now SwiftPM hardcodes that number in Platform.swift in the PackageModel, but I believe we really should be loading the SDKSettings file from the SDK and let it tell us what it should be. I want to work over the next few years and make sure SwiftPM is data driven or makes decisions with the help of plug-ins. It’s too easy for SwiftPM get out of sync if it knows too much or needs to build with a new SDK it’s never seen before. And really, SwiftPM should enforce that you are building with for at least that version since that is what the SDK is stating the minimum it can support. BTW, with MacOS26, that is 10.13.

If you want to support MacOS down to zero, you would need new SDKs for that, which SwiftPM should be able to support if we actually read the SDKSettings file. :).

4 Likes