فهرست منبع

Remove CarPlay support for macCatalyst platform

onevcat 4 سال پیش
والد
کامیت
f9c693153a
3فایلهای تغییر یافته به همراه5 افزوده شده و 5 حذف شده
  1. 1 1
      Sources/Extensions/CPListItem+Kingfisher.swift
  2. 2 2
      Sources/General/KF.swift
  3. 2 2
      Sources/General/Kingfisher.swift

+ 1 - 1
Sources/Extensions/CPListItem+Kingfisher.swift

@@ -25,7 +25,7 @@
 //  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 //  THE SOFTWARE.
 
-#if canImport(CarPlay)
+#if canImport(CarPlay) && !targetEnvironment(macCatalyst)
 import CarPlay
 
 @available(iOS 14.0, *)

+ 2 - 2
Sources/General/KF.swift

@@ -28,7 +28,7 @@
 import UIKit
 #endif
 
-#if canImport(CarPlay)
+#if canImport(CarPlay) && !targetEnvironment(macCatalyst)
 import CarPlay
 #endif
 
@@ -216,7 +216,7 @@ extension KF.Builder {
     }
     #endif // end of canImport(UIKit)
     
-    #if canImport(CarPlay)
+    #if canImport(CarPlay) && !targetEnvironment(macCatalyst)
     
     /// Builds the image task request and sets it to the image for a list item.
     /// - Parameters:

+ 2 - 2
Sources/General/Kingfisher.swift

@@ -45,7 +45,7 @@ public typealias KFCrossPlatformButton = UIButton
 #if canImport(TVUIKit)
 import TVUIKit
 #endif
-#if canImport(CarPlay)
+#if canImport(CarPlay) && !targetEnvironment(macCatalyst)
 import CarPlay
 #endif
 #else
@@ -100,7 +100,7 @@ extension WKInterfaceImage: KingfisherCompatible { }
 extension TVMonogramView: KingfisherCompatible { }
 #endif
 
-#if canImport(CarPlay)
+#if canImport(CarPlay) && !targetEnvironment(macCatalyst)
 @available(iOS 14.0, *)
 extension CPListItem: KingfisherCompatible { }
 #endif