Ad

How To Remove Deployment Target Errors From MacOS App In Xcode?

- 1 answer

I'm getting errors in a Swift Package Manager that certain classes are only available in macOS 10.15 or newer

Errors

However I set the deployment target to 12.3. Is there any other place I need to change the deployment target for this to work?

Deployment Target

Ad

Answer

You have set the deployment target for your Xcode project to 12.3 but to do it for your package you need to add it to your Package.swift file as well using the platforms property

Something like

let package = Package(
    name: "YourPackage",
    platforms: [.macOS(.v12)],
    ...
Ad
source: stackoverflow.com
Ad