Переглянути джерело

Fix xcframework build warnings

onevcat 2 роки тому
батько
коміт
fcfc8f68d9

+ 5 - 0
Sources/Cache/CacheSerializer.swift

@@ -26,6 +26,11 @@
 
 
 import Foundation
 import Foundation
 import CoreGraphics
 import CoreGraphics
+#if os(macOS)
+import AppKit
+#else
+import UIKit
+#endif
 
 
 /// An `CacheSerializer` is used to convert some data to an image object after
 /// An `CacheSerializer` is used to convert some data to an image object after
 /// retrieving it from disk storage, and vice versa, to convert an image to data object
 /// retrieving it from disk storage, and vice versa, to convert an image to data object

+ 5 - 0
Sources/Cache/FormatIndicatedCacheSerializer.swift

@@ -26,6 +26,11 @@
 
 
 import Foundation
 import Foundation
 import CoreGraphics
 import CoreGraphics
+#if os(macOS)
+import AppKit
+#else
+import UIKit
+#endif
 
 
 /// `FormatIndicatedCacheSerializer` lets you indicate an image format for serialized caches.
 /// `FormatIndicatedCacheSerializer` lets you indicate an image format for serialized caches.
 ///
 ///

+ 5 - 0
Sources/General/KFOptionsSetter.swift

@@ -26,6 +26,11 @@
 
 
 import Foundation
 import Foundation
 import CoreGraphics
 import CoreGraphics
+#if os(macOS)
+import AppKit
+#else
+import UIKit
+#endif
 
 
 public protocol KFOptionSetter {
 public protocol KFOptionSetter {
     var options: KingfisherParsedOptionsInfo { get nonmutating set }
     var options: KingfisherParsedOptionsInfo { get nonmutating set }

+ 5 - 0
Sources/General/KingfisherError.swift

@@ -25,6 +25,11 @@
 //  THE SOFTWARE.
 //  THE SOFTWARE.
 
 
 import Foundation
 import Foundation
+#if os(macOS)
+import AppKit
+#else
+import UIKit
+#endif
 
 
 extension Never {}
 extension Never {}
 
 

+ 5 - 0
Sources/General/KingfisherManager.swift

@@ -26,6 +26,11 @@
 
 
 
 
 import Foundation
 import Foundation
+#if os(macOS)
+import AppKit
+#else
+import UIKit
+#endif
 
 
 /// The downloading progress block type.
 /// The downloading progress block type.
 /// The parameter value is the `receivedSize` of current response.
 /// The parameter value is the `receivedSize` of current response.

+ 6 - 0
Sources/Image/Filter.swift

@@ -26,6 +26,12 @@
 
 
 #if !os(watchOS)
 #if !os(watchOS)
 
 
+#if os(macOS)
+import AppKit
+#else
+import UIKit
+#endif
+
 import CoreImage
 import CoreImage
 
 
 // Reuse the same CI Context for all CI drawing.
 // Reuse the same CI Context for all CI drawing.

+ 5 - 0
Sources/Image/ImageProgressive.swift

@@ -26,6 +26,11 @@
 
 
 import Foundation
 import Foundation
 import CoreGraphics
 import CoreGraphics
+#if os(macOS)
+import AppKit
+#else
+import UIKit
+#endif
 
 
 private let sharedProcessingQueue: CallbackQueue =
 private let sharedProcessingQueue: CallbackQueue =
     .dispatch(DispatchQueue(label: "com.onevcat.Kingfisher.ImageDownloader.Process"))
     .dispatch(DispatchQueue(label: "com.onevcat.Kingfisher.ImageDownloader.Process"))

+ 5 - 0
Sources/Networking/ImageDownloaderDelegate.swift

@@ -25,6 +25,11 @@
 //  THE SOFTWARE.
 //  THE SOFTWARE.
 
 
 import Foundation
 import Foundation
+#if os(macOS)
+import AppKit
+#else
+import UIKit
+#endif
 
 
 /// Protocol of `ImageDownloader`. This protocol provides a set of methods which are related to image downloader
 /// Protocol of `ImageDownloader`. This protocol provides a set of methods which are related to image downloader
 /// working stages and rules.
 /// working stages and rules.