Some libraries imported with SPM in Xcode12 have problems with minimum deployment target on iOS (and probably on other platforms). Xcode12 has bumped it to iOS 9, most libraries have it set up as iOS 8.
This results in a warning:
The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.0.99.
The bigger problem arises, when there's a library requiring iOS 8 that depends on a library that does not have any minimum deployment target set:
The package product 'iOSAnyPackage' requires minimum platform version 9.0 for the iOS platform, but this target supports 8.0
I can easily replicate this with a sample project with these local dependencies:
MyProject -> iOS8Package -> iOSAnyPackage
let package = Package( name: "iOS8Package", platforms: [ .iOS(.v8) ], (...) dependencies: [ .package(path: "../iOSAnyPackage") ], targets: [ depends on. .target( name: "iOS8Package", dependencies: ["iOSAnyPackage"]), (...) ] )
let package = Package( name: "iOSAnyPackage", products: [ .library( name: "iOSAnyPackage", targets: ["iOSAnyPackage"]), ], dependencies: [ ], targets: [ depends on. .target( name: "iOSAnyPackage", dependencies: ), .testTarget( name: "iOSAnyPackageTests", dependencies: ["iOSAnyPackage"]), ] )
Is there a way to force all dependencies to use iOS 9 as their minimum deployment target?