SwiftPM: How to specify minimum iOS dependency?

I'm developing a framework that I use internally and it's vended via the Package Manager because I might release it publicly one day (in the distant future), but once your code is pulled into the depending app project, I'm getting 100s of errors because SPM assumes I've written my code to support iOS 9 and above. Because at this stage it's an internal code base, and uses OSLog everywhere, I have no intention of supporting anything below iOS 13. Is there anyway to specify this, or at least get my app to build so I don't have to go and add hundreds of version checks to my package's code?

You can declare a minimum deployment target using the platforms feature: https://github.com/apple/swift-evolution/blob/master/proposals/0236-package-manager-platform-deployment-settings.md


Thank you! :slight_smile:

Terms of Service

Privacy Policy

Cookie Policy