Browse Source

Merge branch 'master' into v8

# Conflicts:
#	Kingfisher.xcodeproj/project.pbxproj
onevcat 2 years ago
parent
commit
ee056cc411
32 changed files with 121 additions and 60 deletions
  1. 9 0
      CHANGELOG.md
  2. 2 1
      Demo/Demo/Kingfisher-Demo/ViewControllers/TransitionViewController.swift
  3. 9 9
      Gemfile.lock
  4. 1 1
      Kingfisher.podspec
  5. 2 2
      Kingfisher.xcodeproj/project.pbxproj
  6. 5 0
      Sources/Cache/CacheSerializer.swift
  7. 5 0
      Sources/Cache/FormatIndicatedCacheSerializer.swift
  8. 1 1
      Sources/General/ImageSource/AVAssetImageDataProvider.swift
  9. 2 2
      Sources/General/KF.swift
  10. 5 0
      Sources/General/KFOptionsSetter.swift
  11. 5 0
      Sources/General/KingfisherError.swift
  12. 5 0
      Sources/General/KingfisherManager.swift
  13. 6 0
      Sources/Image/Filter.swift
  14. 1 1
      Sources/Image/Image.swift
  15. 3 3
      Sources/Image/ImageDrawing.swift
  16. 5 0
      Sources/Image/ImageProgressive.swift
  17. 1 1
      Sources/Image/ImageTransition.swift
  18. 2 2
      Sources/Info.plist
  19. 5 0
      Sources/Networking/ImageDownloaderDelegate.swift
  20. 6 2
      Sources/Networking/ImageModifier.swift
  21. 5 5
      Sources/Networking/ImagePrefetcher.swift
  22. 19 13
      Sources/PrivacyInfo.xcprivacy
  23. 1 1
      Sources/Views/AnimatedImageView.swift
  24. 1 1
      Sources/Views/Indicator.swift
  25. 1 1
      Tests/KingfisherTests/ImageCacheTests.swift
  26. 1 1
      Tests/KingfisherTests/ImageDownloaderTests.swift
  27. 6 6
      Tests/KingfisherTests/ImageExtensionTests.swift
  28. 1 1
      Tests/KingfisherTests/ImageModifierTests.swift
  29. 2 2
      Tests/KingfisherTests/Info.plist
  30. 1 1
      Tests/KingfisherTests/KingfisherManagerTests.swift
  31. 2 2
      Tests/KingfisherTests/KingfisherOptionsInfoTests.swift
  32. 1 1
      Tests/KingfisherTests/KingfisherTestHelper.swift

+ 9 - 0
CHANGELOG.md

@@ -2,6 +2,15 @@
 
 -----
 
+## [7.9.1 - Lastest Xcode 15 beta](https://github.com/onevcat/Kingfisher/releases/tag/7.9.1) (2023-08-26)
+
+#### Fix
+* Update to the terminology for the latest Xcode 15 beta. It prevents building failing and warnings from previous beta versions. [#2123](https://github.com/onevcat/Kingfisher/pull/2123) @simonbs
+* A misused reason in the privacy manifest file. Now Kingfisher should declare the reason of using file creation and access time correctly. (However, the manifest file mechanism of SDK seems not working yet in Xcode 15 beta 7) [#2135](https://github.com/onevcat/Kingfisher/pull/2135) @CloudosaurusRex @onevcat
+* Some warnings which happens when building xcframework. This prevents them from becoming errors in the coming Swift 6. [#2136](https://github.com/onevcat/Kingfisher/pull/2136)
+
+---
+
 ## [7.9.0 - visionOS & Xcode 15](https://github.com/onevcat/Kingfisher/releases/tag/7.9.0) (2023-07-29)
 
 #### Add

+ 2 - 1
Demo/Demo/Kingfisher-Demo/ViewControllers/TransitionViewController.swift

@@ -95,9 +95,10 @@ extension TransitionViewController: UIPickerViewDataSource {
     }
     
     func pickerView(_ pickerView: UIPickerView, numberOfRowsInComponent component: Int) -> Int {
-        switch PickerComponent(rawValue: component)!  {
+        switch PickerComponent(rawValue: component)  {
         case .transitionType: return transitions.count
         case .duration: return durations.count
+        default: return 0
         }
     }
 }

+ 9 - 9
Gemfile.lock

@@ -3,12 +3,12 @@ GEM
   specs:
     CFPropertyList (3.0.6)
       rexml
-    activesupport (7.0.6)
+    activesupport (7.0.7.2)
       concurrent-ruby (~> 1.0, >= 1.0.2)
       i18n (>= 1.6, < 2)
       minitest (>= 5.1)
       tzinfo (~> 2.0)
-    addressable (2.8.4)
+    addressable (2.8.5)
       public_suffix (>= 2.0.2, < 6.0)
     algoliasearch (1.27.5)
       httpclient (~> 2.8, >= 2.8.3)
@@ -16,8 +16,8 @@ GEM
     artifactory (3.0.15)
     atomos (0.1.3)
     aws-eventstream (1.2.0)
-    aws-partitions (1.794.0)
-    aws-sdk-core (3.180.0)
+    aws-partitions (1.812.0)
+    aws-sdk-core (3.181.0)
       aws-eventstream (~> 1, >= 1.0.2)
       aws-partitions (~> 1, >= 1.651.0)
       aws-sigv4 (~> 1.5)
@@ -25,8 +25,8 @@ GEM
     aws-sdk-kms (1.71.0)
       aws-sdk-core (~> 3, >= 3.177.0)
       aws-sigv4 (~> 1.1)
-    aws-sdk-s3 (1.132.0)
-      aws-sdk-core (~> 3, >= 3.179.0)
+    aws-sdk-s3 (1.134.0)
+      aws-sdk-core (~> 3, >= 3.181.0)
       aws-sdk-kms (~> 1)
       aws-sigv4 (~> 1.6)
     aws-sigv4 (1.6.0)
@@ -85,7 +85,7 @@ GEM
     escape (0.0.4)
     ethon (0.16.0)
       ffi (>= 1.15.0)
-    excon (0.100.0)
+    excon (0.102.0)
     faraday (1.10.3)
       faraday-em_http (~> 1.0)
       faraday-em_synchrony (~> 1.0)
@@ -158,7 +158,7 @@ GEM
     fourflusher (2.3.1)
     fuzzy_match (2.0.4)
     gh_inspector (1.1.3)
-    google-apis-androidpublisher_v3 (0.46.0)
+    google-apis-androidpublisher_v3 (0.48.0)
       google-apis-core (>= 0.11.0, < 2.a)
     google-apis-core (0.11.1)
       addressable (~> 2.5, >= 2.5.1)
@@ -207,7 +207,7 @@ GEM
     jwt (2.7.1)
     memoist (0.16.2)
     mini_magick (4.12.0)
-    mini_mime (1.1.2)
+    mini_mime (1.1.5)
     minitest (5.19.0)
     molinillo (0.8.0)
     multi_json (1.15.0)

+ 1 - 1
Kingfisher.podspec

@@ -1,7 +1,7 @@
 Pod::Spec.new do |s|
 
   s.name         = "Kingfisher"
-  s.version      = "7.9.0"
+  s.version      = "7.9.1"
   s.summary      = "A lightweight and pure Swift implemented library for downloading and cacheing image from the web."
 
   s.description  = <<-DESC

+ 2 - 2
Kingfisher.xcodeproj/project.pbxproj

@@ -1068,7 +1068,7 @@
 				CURRENT_PROJECT_VERSION = 2624;
 				DEAD_CODE_STRIPPING = YES;
 				DYLIB_COMPATIBILITY_VERSION = 1;
-				DYLIB_CURRENT_VERSION = 2624;
+				DYLIB_CURRENT_VERSION = 2639;
 				DYLIB_INSTALL_NAME_BASE = "@rpath";
 				GCC_TREAT_IMPLICIT_FUNCTION_DECLARATIONS_AS_ERRORS = YES;
 				GCC_TREAT_INCOMPATIBLE_POINTER_TYPE_WARNINGS_AS_ERRORS = YES;
@@ -1127,7 +1127,7 @@
 				CURRENT_PROJECT_VERSION = 2624;
 				DEAD_CODE_STRIPPING = YES;
 				DYLIB_COMPATIBILITY_VERSION = 1;
-				DYLIB_CURRENT_VERSION = 2624;
+				DYLIB_CURRENT_VERSION = 2639;
 				DYLIB_INSTALL_NAME_BASE = "@rpath";
 				GCC_TREAT_IMPLICIT_FUNCTION_DECLARATIONS_AS_ERRORS = YES;
 				GCC_TREAT_INCOMPATIBLE_POINTER_TYPE_WARNINGS_AS_ERRORS = YES;

+ 5 - 0
Sources/Cache/CacheSerializer.swift

@@ -26,6 +26,11 @@
 
 import Foundation
 import CoreGraphics
+#if os(macOS)
+import AppKit
+#else
+import UIKit
+#endif
 
 /// 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

+ 5 - 0
Sources/Cache/FormatIndicatedCacheSerializer.swift

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

+ 1 - 1
Sources/General/ImageSource/AVAssetImageDataProvider.swift

@@ -127,7 +127,7 @@ extension CGImage {
         guard let mutableData = CFDataCreateMutable(nil, 0) else {
             return nil
         }
-#if os(xrOS)
+#if os(visionOS)
         guard let destination = CGImageDestinationCreateWithData(
             mutableData, UTType.jpeg.identifier as CFString , 1, nil
         ) else {

+ 2 - 2
Sources/General/KF.swift

@@ -313,7 +313,7 @@ extension KF.Builder {
 
 #if !os(watchOS)
 extension KF.Builder {
-    #if os(iOS) || os(tvOS)
+    #if os(iOS) || os(tvOS) || os(visionOS)
 
     /// Sets a placeholder which is used while retrieving the image.
     /// - Parameter placeholder: A placeholder to show while retrieving the image from its source.
@@ -336,7 +336,7 @@ extension KF.Builder {
 
 extension KF.Builder {
 
-    #if os(iOS) || os(tvOS)
+    #if os(iOS) || os(tvOS) || os(visionOS)
     /// Sets the transition for the image task.
     /// - Parameter transition: The desired transition effect when setting the image to image view.
     /// - Returns: A `KF.Builder` with changes applied.

+ 5 - 0
Sources/General/KFOptionsSetter.swift

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

+ 5 - 0
Sources/General/KingfisherError.swift

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

+ 5 - 0
Sources/General/KingfisherManager.swift

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

+ 6 - 0
Sources/Image/Filter.swift

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

+ 1 - 1
Sources/Image/Image.swift

@@ -278,7 +278,7 @@ extension KingfisherWrapper where Base: KFCrossPlatformImage {
     /// - Returns: An `Image` object represents the animated image. It is in form of an array of image frames with a
     ///            certain duration. `nil` if anything wrong when creating animated image.
     public static func animatedImage(data: Data, options: ImageCreatingOptions) -> KFCrossPlatformImage? {
-        #if os(xrOS)
+        #if os(visionOS)
         let info: [String: Any] = [
             kCGImageSourceShouldCache as String: true,
             kCGImageSourceTypeIdentifierHint as String: UTType.gif.identifier

+ 3 - 3
Sources/Image/ImageDrawing.swift

@@ -201,7 +201,7 @@ extension KingfisherWrapper where Base: KFCrossPlatformImage {
     }
     #endif
     
-    #if os(iOS) || os(tvOS)
+    #if os(iOS) || os(tvOS) || os(visionOS)
     func resize(to size: CGSize, for contentMode: UIView.ContentMode) -> KFCrossPlatformImage {
         switch contentMode {
         case .scaleAspectFit:
@@ -513,7 +513,7 @@ extension KingfisherWrapper where Base: KFCrossPlatformImage {
     ///         For any non-CG-based image or animated image, `base` itself is returned.
     public func decoded(scale: CGFloat) -> KFCrossPlatformImage {
         // Prevent animated image (GIF) losing it's images
-        #if os(iOS)
+        #if os(iOS) || os(visionOS)
         if frameSource != nil { return base }
         #else
         if images != nil { return base }
@@ -542,7 +542,7 @@ extension KingfisherWrapper where Base: KFCrossPlatformImage {
     ///         For any non-CG-based image or animated image, `base` itself is returned.
     public func decoded(on context: CGContext) -> KFCrossPlatformImage {
         // Prevent animated image (GIF) losing it's images
-        #if os(iOS)
+        #if os(iOS) || os(visionOS)
         if frameSource != nil { return base }
         #else
         if images != nil { return base }

+ 5 - 0
Sources/Image/ImageProgressive.swift

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

+ 1 - 1
Sources/Image/ImageTransition.swift

@@ -25,7 +25,7 @@
 //  THE SOFTWARE.
 
 import Foundation
-#if os(iOS) || os(tvOS)
+#if os(iOS) || os(tvOS) || os(visionOS)
 import UIKit
 
 /// Transition effect which will be used when an image downloaded and set by `UIImageView`

+ 2 - 2
Sources/Info.plist

@@ -15,11 +15,11 @@
 	<key>CFBundlePackageType</key>
 	<string>FMWK</string>
 	<key>CFBundleShortVersionString</key>
-	<string>7.9.0</string>
+	<string>7.9.1</string>
 	<key>CFBundleSignature</key>
 	<string>????</string>
 	<key>CFBundleVersion</key>
-	<string>2624</string>
+	<string>2639</string>
 	<key>NSPrincipalClass</key>
 	<string></string>
 </dict>

+ 5 - 0
Sources/Networking/ImageDownloaderDelegate.swift

@@ -25,6 +25,11 @@
 //  THE SOFTWARE.
 
 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
 /// working stages and rules.

+ 6 - 2
Sources/Networking/ImageModifier.swift

@@ -24,7 +24,11 @@
 //  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 //  THE SOFTWARE.
 
-import Foundation
+#if os(macOS)
+import AppKit
+#else
+import UIKit
+#endif
 
 /// An `ImageModifier` can be used to change properties on an image between cache serialization and the actual use of
 /// the image. The `modify(_:)` method will be called after the image retrieved from its source and before it returned
@@ -63,7 +67,7 @@ public struct AnyImageModifier: ImageModifier {
     }
 }
 
-#if os(iOS) || os(tvOS) || os(watchOS)
+#if os(iOS) || os(tvOS) || os(watchOS) || os(visionOS)
 import UIKit
 
 /// Modifier for setting the rendering mode of images.

+ 5 - 5
Sources/Networking/ImagePrefetcher.swift

@@ -99,7 +99,7 @@ public class ImagePrefetcher: CustomStringConvertible {
     // A manager used for prefetching. We will use the helper methods in manager.
     private let manager: KingfisherManager
 
-    private let pretchQueue = DispatchQueue(label: "com.onevcat.Kingfisher.ImagePrefetcher.pretchQueue")
+    private let prefetchQueue = DispatchQueue(label: "com.onevcat.Kingfisher.ImagePrefetcher.prefetchQueue")
     private static let requestingQueue = DispatchQueue(label: "com.onevcat.Kingfisher.ImagePrefetcher.requestingQueue")
 
     private var finished: Bool {
@@ -263,7 +263,7 @@ public class ImagePrefetcher: CustomStringConvertible {
         // We want all callbacks from our prefetch queue, so we should ignore the callback queue in options.
         // Add our own callback dispatch queue to make sure all internal callbacks are
         // coming back in our expected queue.
-        options.callbackQueue = .dispatch(pretchQueue)
+        options.callbackQueue = .dispatch(prefetchQueue)
         optionsInfo = options
 
         let cache = optionsInfo.targetCache ?? .default
@@ -275,7 +275,7 @@ public class ImagePrefetcher: CustomStringConvertible {
     /// of assets that are required for later use in an app. This code will not try and update any UI
     /// with the results of the process.
     public func start() {
-        pretchQueue.async {
+        prefetchQueue.async {
             guard !self.stopped else {
                 assertionFailure("You can not restart the same prefetcher. Try to create a new prefetcher.")
                 self.handleComplete()
@@ -305,7 +305,7 @@ public class ImagePrefetcher: CustomStringConvertible {
 
     /// Stops current downloading progress, and cancel any future prefetching activity that might be occuring.
     public func stop() {
-        pretchQueue.async {
+        prefetchQueue.async {
             if self.finished { return }
             self.stopped = true
             self.tasks.values.forEach { $0.cancel() }
@@ -410,7 +410,7 @@ public class ImagePrefetcher: CustomStringConvertible {
     private func reportCompletionOrStartNext() {
         if let resource = self.pendingSources.popFirst() {
             // Loose call stack for huge ammount of sources.
-            pretchQueue.async { self.startPrefetching(resource) }
+            prefetchQueue.async { self.startPrefetching(resource) }
         } else {
             guard allFinished else { return }
             self.handleComplete()

+ 19 - 13
Sources/PrivacyInfo.xcprivacy

@@ -2,18 +2,24 @@
 <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
 <plist version="1.0">
 <dict>
-	<key>NSPrivacyAccessedAPITypes</key>
-	<array>
-		<dict>
-			<key>NSPrivacyAccessedAPIType</key>
-			<string>NSPrivacyAccessedAPICategoryFileTimestamp</string>
-			<key>NSPrivacyAccessedAPITypeReasons</key>
-			<array>
-				<string>Calculate cache expiring date for disk files based on developer settings and cache policy.</string>
-			</array>
-		</dict>
-	</array>
-	<key>NSPrivacyTracking</key>
-	<false/>
+    <key>NSPrivacyAccessedAPITypes</key>
+    <array>
+        <dict>
+            <key>NSPrivacyAccessedAPIType</key>
+            <string>NSPrivacyAccessedAPICategoryFileTimestamp</string>
+            <key>NSPrivacyAccessedAPITypeReasons</key>
+            <array>
+                <string>C617.1</string>
+            </array>
+        </dict>
+    </array>
+    <key>NSPrivacyTracking</key>
+    <false/>
+  <key>NSPrivacyTrackingDomains</key>
+  <array>
+  </array>
+  <key>NSPrivacyCollectedDataTypes</key>
+  <array>
+  </array>
 </dict>
 </plist>

+ 1 - 1
Sources/Views/AnimatedImageView.swift

@@ -265,7 +265,7 @@ open class AnimatedImageView: UIImageView {
     private func reset() {
         animator = nil
         if let image = image, let frameSource = image.kf.frameSource {
-            #if os(xrOS)
+            #if os(visionOS)
             let targetSize = bounds.scaled(UITraitCollection.current.displayScale).size
             #else
             let targetSize = bounds.scaled(UIScreen.main.scale).size

+ 1 - 1
Sources/Views/Indicator.swift

@@ -148,7 +148,7 @@ final class ActivityIndicator: Indicator {
             } else {
                 indicatorStyle = UIActivityIndicatorView.Style.white
             }
-            #elseif os(xrOS)
+            #elseif os(visionOS)
             indicatorStyle = UIActivityIndicatorView.Style.medium
             #else
             if #available(iOS 13.0, * ) {

+ 1 - 1
Tests/KingfisherTests/ImageCacheTests.swift

@@ -384,7 +384,7 @@ class ImageCacheTests: XCTestCase {
         waitForExpectations(timeout: 3, handler: nil)
     }
 
-#if os(iOS) || os(tvOS) || os(watchOS)
+#if os(iOS) || os(tvOS) || os(watchOS) || os(visionOS)
     func testModifierShouldOnlyApplyForFinalResultWhenMemoryLoad() {
         let exp = expectation(description: #function)
         let key = testKeys[0]

+ 1 - 1
Tests/KingfisherTests/ImageDownloaderTests.swift

@@ -508,7 +508,7 @@ class ImageDownloaderTests: XCTestCase {
         waitForExpectations(timeout: 3, handler: nil)
     }
     
-#if os(iOS) || os(tvOS) || os(watchOS)
+#if os(iOS) || os(tvOS) || os(watchOS) || os(visionOS)
     func testModifierShouldOnlyApplyForFinalResultWhenDownload() {
         let exp = expectation(description: #function)
 

+ 6 - 6
Tests/KingfisherTests/ImageExtensionTests.swift

@@ -58,7 +58,7 @@ class ImageExtensionTests: XCTestCase {
         let options = ImageCreatingOptions()
         let image = KingfisherWrapper<KFCrossPlatformImage>.animatedImage(data: testImageGIFData, options: options)
         XCTAssertNotNil(image)
-        #if os(iOS) || os(tvOS)
+        #if os(iOS) || os(tvOS) || os(visionOS)
         XCTAssertEqual(image!.kf.imageFrameCount!, 8)
         #else
         XCTAssertEqual(image!.kf.images!.count, 8)
@@ -66,7 +66,7 @@ class ImageExtensionTests: XCTestCase {
         #endif
     }
 
-    #if os(iOS) || os(tvOS)
+    #if os(iOS) || os(tvOS) || os(visionOS)
     func testScaleForGIFImage() {
         let options = ImageCreatingOptions(scale: 2.0, duration: 0.0, preloadAll: false, onlyFirstFrame: false)
         let image = KingfisherWrapper<KFCrossPlatformImage>.animatedImage(data: testImageGIFData, options: options)
@@ -94,7 +94,7 @@ class ImageExtensionTests: XCTestCase {
         let options = ImageCreatingOptions()
         let image = KingfisherWrapper<KFCrossPlatformImage>.animatedImage(data: testImageSingleFrameGIFData, options: options)
         XCTAssertNotNil(image)
-        #if os(iOS) || os(tvOS)
+        #if os(iOS) || os(tvOS) || os(visionOS)
         XCTAssertEqual(image!.kf.imageFrameCount!, 1)
         #else
         XCTAssertEqual(image!.kf.images!.count, 1)
@@ -113,7 +113,7 @@ class ImageExtensionTests: XCTestCase {
         let preloadOptions = ImageCreatingOptions(preloadAll: true)
         let image = KingfisherWrapper<KFCrossPlatformImage>.animatedImage(data: testImageSingleFrameGIFData, options: preloadOptions)!
         XCTAssertNotNil(image, "The image should be initiated.")
-#if os(iOS) || os(tvOS)
+#if os(iOS) || os(tvOS) || os(visionOS)
         XCTAssertNil(image.kf.imageSource, "Image source should be nil")
 #endif
         XCTAssertEqual(image.kf.duration, image.kf.duration)
@@ -247,7 +247,7 @@ class ImageExtensionTests: XCTestCase {
     }
     
     func testDecodeScale() {
-        #if os(iOS) || os(tvOS)
+        #if os(iOS) || os(tvOS) || os(visionOS)
         let image = testImage
         XCTAssertEqual(image.size, CGSize(width: 64, height: 64))
         XCTAssertEqual(image.scale, 1.0)
@@ -278,7 +278,7 @@ class ImageExtensionTests: XCTestCase {
         XCTAssertNotNil(gifImage)
         XCTAssertEqual(gifImage!.kf.normalized, gifImage!)
         
-        #if os(iOS) || os(tvOS)
+        #if os(iOS) || os(tvOS) || os(visionOS)
         // No need to normalize up orientation image.
         let normalImage = testImage
         XCTAssertEqual(normalImage.imageOrientation, .up)

+ 1 - 1
Tests/KingfisherTests/ImageModifierTests.swift

@@ -48,7 +48,7 @@ class ImageModifierTests: XCTestCase {
         XCTAssert(modifiedImage == image)
     }
 
-#if os(iOS) || os(tvOS) || os(watchOS)
+#if os(iOS) || os(tvOS) || os(watchOS) || os(visionOS)
 
     func testRenderingModeImageModifier() {
         let m1 = RenderingModeImageModifier(renderingMode: .alwaysOriginal)

+ 2 - 2
Tests/KingfisherTests/Info.plist

@@ -15,10 +15,10 @@
 	<key>CFBundlePackageType</key>
 	<string>BNDL</string>
 	<key>CFBundleShortVersionString</key>
-	<string>7.9.0</string>
+	<string>7.9.1</string>
 	<key>CFBundleSignature</key>
 	<string>????</string>
 	<key>CFBundleVersion</key>
-	<string>2624</string>
+	<string>2639</string>
 </dict>
 </plist>

+ 1 - 1
Tests/KingfisherTests/KingfisherManagerTests.swift

@@ -656,7 +656,7 @@ class KingfisherManagerTests: XCTestCase {
         waitForExpectations(timeout: 3, handler: nil)
     }
 
-#if os(iOS) || os(tvOS) || os(watchOS)
+#if os(iOS) || os(tvOS) || os(watchOS) || os(visionOS)
     func testShouldApplyImageModifierWhenDownload() {
         let exp = expectation(description: #function)
         let url = testURLs[0]

+ 2 - 2
Tests/KingfisherTests/KingfisherOptionsInfoTests.swift

@@ -35,7 +35,7 @@ class KingfisherOptionsInfoTests: XCTestCase {
         XCTAssertTrue(options.targetCache === nil)
         XCTAssertTrue(options.downloader === nil)
 
-#if os(iOS) || os(tvOS)
+#if os(iOS) || os(tvOS) || os(visionOS)
         switch options.transition {
         case .none: break
         default: XCTFail("The transition for empty option should be .None. But \(options.transition)")
@@ -99,7 +99,7 @@ class KingfisherOptionsInfoTests: XCTestCase {
         XCTAssertTrue(options.originalCache === cache)
         XCTAssertTrue(options.downloader === downloader)
 
-        #if os(iOS) || os(tvOS)
+        #if os(iOS) || os(tvOS) || os(visionOS)
         let transition = ImageTransition.fade(0.5)
         options.transition = transition
         switch options.transition {

+ 1 - 1
Tests/KingfisherTests/KingfisherTestHelper.swift

@@ -196,7 +196,7 @@ extension KFCrossPlatformImage {
     }
 }
 
-#if os(iOS) || os(tvOS)
+#if os(iOS) || os(tvOS) || os(visionOS)
 import UIKit
 extension KFCrossPlatformImage {
     static func from(color: KFCrossPlatformColor, size: CGSize) -> KFCrossPlatformImage {