I'm working on a iOS project that need to support iOS 10+. I would like to build some new features with SwiftUI and make them only available for our iOS 13+ users by using @available(iOS 13.0, *)
.
This works fine as long as I use only out of the box components.
However, when importing a community-made SwiftUI component that is targeted iOS 13 and up I get the following error:
Compiling for iOS 10.0, but module 'SwiftUIPager' has a minimum deployment target of iOS 13.0:
DerivedData/MyApp-qbarasdasdaasdbsp/Build/Products/Debug-iphonesimulator/SwiftUIPager.swiftmodule/x86_64-apple-ios-simulator.swiftmodule
This makes sense because the module has set iOS 13+ as the SupportedPlatform
. I've suggested the author to lower the target to iOS 10 and add @available(iOS 13.0, *)
's everywhere but of course that is also not ideal because it renders the SupportedPlatform attribute of SPM useless.
Is there a way of including packages like this in a project that wants to support lower a lower target than the package supports? Is this a flaw on the design of the Swift package manifest file?