onevcat пре 5 година
родитељ
комит
cd66440cb6

+ 2 - 2
Sources/General/KF.swift

@@ -28,7 +28,7 @@
 import UIKit
 #endif
 
-#if canImport(AppKit)
+#if canImport(AppKit) && !targetEnvironment(macCatalyst)
 import AppKit
 #endif
 
@@ -194,7 +194,7 @@ extension KF.Builder {
     }
     #endif // end of canImport(UIKit)
 
-    #if canImport(AppKit)
+    #if canImport(AppKit) && !targetEnvironment(macCatalyst)
     /// Builds the image task request and sets it to a button.
     /// - Parameter button: The button which loads the task and should be set with the image.
     /// - Returns: A task represents the image downloading, if initialized.

+ 1 - 1
Sources/Image/Placeholder.swift

@@ -26,7 +26,7 @@
 
 #if !os(watchOS)
 
-#if canImport(AppKit)
+#if canImport(AppKit) && !targetEnvironment(macCatalyst)
 import AppKit
 #endif
 

+ 1 - 1
Tests/KingfisherTests/NSButtonExtensionTests.swift

@@ -24,7 +24,7 @@
 //  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 //  THE SOFTWARE.
 
-#if canImport(AppKit)
+#if canImport(AppKit) && !targetEnvironment(macCatalyst)
 import AppKit
 import XCTest
 @testable import Kingfisher