onevcat преди 5 години
родител
ревизия
cd66440cb6
променени са 3 файла, в които са добавени 4 реда и са изтрити 4 реда
  1. 2 2
      Sources/General/KF.swift
  2. 1 1
      Sources/Image/Placeholder.swift
  3. 1 1
      Tests/KingfisherTests/NSButtonExtensionTests.swift

+ 2 - 2
Sources/General/KF.swift

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

+ 1 - 1
Sources/Image/Placeholder.swift

@@ -26,7 +26,7 @@
 
 
 #if !os(watchOS)
 #if !os(watchOS)
 
 
-#if canImport(AppKit)
+#if canImport(AppKit) && !targetEnvironment(macCatalyst)
 import AppKit
 import AppKit
 #endif
 #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
 //  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 //  THE SOFTWARE.
 //  THE SOFTWARE.
 
 
-#if canImport(AppKit)
+#if canImport(AppKit) && !targetEnvironment(macCatalyst)
 import AppKit
 import AppKit
 import XCTest
 import XCTest
 @testable import Kingfisher
 @testable import Kingfisher