Home > Software engineering >  How to remove deployment target errors from MacOS app in Xcode?
How to remove deployment target errors from MacOS app in Xcode?

Time:08-08

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

CodePudding user response:

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)],
    ...
  • Related