@@ -1,9 +1,9 @@
-// swift-tools-version:5.0
+// swift-tools-version:5.1
import PackageDescription
let package = Package(
name: "Kingfisher",
- platforms: [.iOS("10.0"), .macOS("10.12"), .tvOS("10.0"), .watchOS("3.0")],
+ platforms: [.iOS(.v10), .macOS(.v10_12), .tvOS(.v10), .watchOS(.v3)],
products: [
.library(name: "Kingfisher", targets: ["Kingfisher"])
],
@@ -24,7 +24,7 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
-#if os(macOS)
+#if canImport(AppKit) && !targetEnvironment(macCatalyst)
import AppKit
@@ -24,6 +24,7 @@
+#if canImport(UIKit)
import UIKit
extension KingfisherWrapper where Base: UIButton {
@@ -390,3 +391,4 @@ extension KingfisherWrapper where Base: UIButton {
return nil
}
+#endif
-#if os(watchOS)
+#if canImport(WatchKit)
import WatchKit
-#if canImport(AppKit) && !targetEnvironment(UIKitForMac)
#elseif canImport(UIKit)
@@ -26,7 +26,7 @@
import Accelerate
#endif
#if canImport(UIKit)
@@ -27,7 +27,7 @@
import Foundation
import CoreGraphics
@@ -32,7 +32,7 @@ extension Float {
extension NSBezierPath {
convenience init(roundedRect rect: NSRect, topLeftRadius: CGFloat, topRightRadius: CGFloat,
@@ -31,6 +31,7 @@
// The name and characters used in the demo of this software are property of their
// respective owners.
import ImageIO
@@ -568,3 +569,4 @@ extension Array {
return indices ~= index ? self[index] : nil
public typealias IndicatorView = NSView
#else
@@ -120,6 +120,8 @@ final class ActivityIndicator: Indicator {
#if os(tvOS)
let indicatorStyle = UIActivityIndicatorView.Style.white
+ #elseif targetEnvironment(macCatalyst)
+ let indicatorStyle = UIActivityIndicatorView.Style.medium
let indicatorStyle = UIActivityIndicatorView.Style.gray