|
|
@@ -27,12 +27,10 @@
|
|
|
|
|
|
#if os(macOS)
|
|
|
import AppKit
|
|
|
-nonisolated(unsafe) private let imagesKey = malloc(1)!
|
|
|
-nonisolated(unsafe) private let durationKey = malloc(1)!
|
|
|
-#else
|
|
|
+#else // os(macOS)
|
|
|
import UIKit
|
|
|
import MobileCoreServices
|
|
|
-#endif
|
|
|
+#endif // os(macOS)
|
|
|
|
|
|
#if !os(watchOS)
|
|
|
import CoreImage
|
|
|
@@ -45,9 +43,23 @@ import ImageIO
|
|
|
import UniformTypeIdentifiers
|
|
|
#endif
|
|
|
|
|
|
+#if compiler(>=5.10)
|
|
|
nonisolated(unsafe) private let animatedImageDataKey = malloc(1)!
|
|
|
nonisolated(unsafe) private let imageFrameCountKey = malloc(1)!
|
|
|
nonisolated(unsafe) private let imageSourceKey = malloc(1)!
|
|
|
+#if os(macOS)
|
|
|
+nonisolated(unsafe) private let imagesKey = malloc(1)!
|
|
|
+nonisolated(unsafe) private let durationKey = malloc(1)!
|
|
|
+#endif // os(macOS)
|
|
|
+#else // compiler(>=5.10)
|
|
|
+private let animatedImageDataKey = malloc(1)!
|
|
|
+private let imageFrameCountKey = malloc(1)!
|
|
|
+private let imageSourceKey = malloc(1)!
|
|
|
+#if os(macOS)
|
|
|
+private let imagesKey = malloc(1)!
|
|
|
+private let durationKey = malloc(1)!
|
|
|
+#endif os(macOS)
|
|
|
+#endif // compiler(>=5.10)
|
|
|
|
|
|
// MARK: - Image Properties
|
|
|
extension KingfisherWrapper where Base: KFCrossPlatformImage {
|