From 66256889f27db37123e4989d4d33ae0ee67db685 Mon Sep 17 00:00:00 2001 From: Tom Kidd Date: Thu, 2 Jan 2020 16:22:01 -0600 Subject: [PATCH] Changes to fix Catalyst compatibility --- Source/Charts/Utils/Platform+Color.swift | 2 +- Source/Charts/Utils/Platform+Gestures.swift | 2 +- Source/Charts/Utils/Platform+Graphics.swift | 2 +- Source/Charts/Utils/Platform+Touch Handling.swift | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Source/Charts/Utils/Platform+Color.swift b/Source/Charts/Utils/Platform+Color.swift index fafc325536..0f7139fa70 100644 --- a/Source/Charts/Utils/Platform+Color.swift +++ b/Source/Charts/Utils/Platform+Color.swift @@ -28,7 +28,7 @@ extension UIColor } #endif -#if canImport(AppKit) +#if canImport(AppKit) && !targetEnvironment(macCatalyst) import AppKit diff --git a/Source/Charts/Utils/Platform+Gestures.swift b/Source/Charts/Utils/Platform+Gestures.swift index 652c25ed0c..9d7de06dba 100644 --- a/Source/Charts/Utils/Platform+Gestures.swift +++ b/Source/Charts/Utils/Platform+Gestures.swift @@ -84,7 +84,7 @@ extension NSUIPinchGestureRecognizer #endif // MARK: - AppKit -#if canImport(AppKit) +#if canImport(AppKit) && !targetEnvironment(macCatalyst) import AppKit public typealias NSUIGestureRecognizer = NSGestureRecognizer diff --git a/Source/Charts/Utils/Platform+Graphics.swift b/Source/Charts/Utils/Platform+Graphics.swift index 6abb21e896..952a5be492 100644 --- a/Source/Charts/Utils/Platform+Graphics.swift +++ b/Source/Charts/Utils/Platform+Graphics.swift @@ -51,7 +51,7 @@ func NSUIGraphicsBeginImageContextWithOptions(_ size: CGSize, _ opaque: Bool, _ #endif // MARK: - AppKit -#if canImport(AppKit) +#if canImport(AppKit) && !targetEnvironment(macCatalyst) import AppKit func NSUIGraphicsGetCurrentContext() -> CGContext? diff --git a/Source/Charts/Utils/Platform+Touch Handling.swift b/Source/Charts/Utils/Platform+Touch Handling.swift index afcfdd85ba..d968b012e5 100644 --- a/Source/Charts/Utils/Platform+Touch Handling.swift +++ b/Source/Charts/Utils/Platform+Touch Handling.swift @@ -64,7 +64,7 @@ extension UIView #endif -#if canImport(AppKit) +#if canImport(AppKit) && !targetEnvironment(macCatalyst) import AppKit public typealias NSUIEvent = NSEvent