The Xcode 12 beta includes Swift 5.3 but drops support for iOS 8.x. This means that Swift packages that support iOS 8 will cause a warning:

The iOS 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.

It's not possible to remove this warning within a project that depends on a Swift package with a deployment target of iOS 8, but it is possible to fix this in the dependency without removing support for iOS 8 for older versions of Swift by utilising a version-specific manifest.

I was not able to find documentation on version-specific manifests, but the source code shows they take priority over the default Package.swift file and will search for files in the following order:

  • @swift-(major).(minor).(patch)
  • @swift-(major).(minor)
  • @swift-(major)

In this example a new Package@swift-5.3.swift file can be added with a small change:

-// swift-tools-version:5.2
+// swift-tools-version:5.3
    platforms: [
-        .iOS(.v8),
+        .iOS(.v9),
    ],

This change is arguably not a breaking change so does not require a new major version of the package but it still fixes the warning. It could be argued that someone may use Xcode 12 with an older version of Swift or an older version of Xcode with a newer version of Swift, but the App Store would not accept an app built a Swift toolchain that did not come with the download of Xcode.

I have made this change in a personal project (Persist) without any issues, and have also opened PRs on 2 projects that I use: DeviceKit and KeychainAccess.

If you run in to this warning caused by one of the dependencies you use open a PR for them, I'm sure they'll appreciate it!