Skip to content

Commit

Permalink
Change iOS deployment target for Xcode 12
Browse files Browse the repository at this point in the history
This removes the warning about iOS 8 no longer being supported in Xcode 12 while maintaining support for older versions of Xcode. Technically checking the compiler version isn’t an exact 1:1 for checking for Xcode version, but in practice should work in all scenarios.
  • Loading branch information
davbeck committed Nov 30, 2020
1 parent 69fa475 commit 1311b59
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,18 @@

import PackageDescription

var platforms: [SupportedPlatform] {
#if compiler(<5.3)
return [.iOS(.v8)]
#else
// Xcode 12 (which ships with Swift 5.3) drops support for iOS 8
return[.iOS(.v9)]
#endif
}

let package = Package(
name: "TOCropViewController",
platforms: [.iOS(.v8)],
platforms: platforms,
products: [
.library(
name: "TOCropViewController",
Expand Down

0 comments on commit 1311b59

Please sign in to comment.