Browse Source

Add changes for Xcode 11 beta 4

Marcos Griselli 6 years ago
parent
commit
e9e69903e4

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

@@ -24,7 +24,7 @@
 //  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 //  THE SOFTWARE.
 
-#if canImport(AppKit)
+#if canImport(AppKit) && !targetEnvironment(macCatalyst)
 
 import AppKit
 

+ 1 - 1
Sources/General/Deprecated.swift

@@ -24,7 +24,7 @@
 //  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 //  THE SOFTWARE.
 
-#if canImport(AppKit) && !targetEnvironment(UIKitForMac)
+#if canImport(AppKit) && !targetEnvironment(macCatalyst)
 import AppKit
 #elseif canImport(UIKit)
 import UIKit

+ 1 - 1
Sources/Image/ImageDrawing.swift

@@ -26,7 +26,7 @@
 
 import Accelerate
 
-#if canImport(AppKit) && !targetEnvironment(UIKitForMac)
+#if canImport(AppKit) && !targetEnvironment(macCatalyst)
 import AppKit
 #endif
 #if canImport(UIKit)

+ 1 - 1
Sources/Image/ImageProcessor.swift

@@ -27,7 +27,7 @@
 import Foundation
 import CoreGraphics
 
-#if canImport(AppKit) && !targetEnvironment(UIKitForMac)
+#if canImport(AppKit) && !targetEnvironment(macCatalyst)
 import AppKit
 #endif
 

+ 1 - 1
Sources/Utility/ExtensionHelpers.swift

@@ -32,7 +32,7 @@ extension Float {
     }
 }
 
-#if canImport(AppKit) && !targetEnvironment(UIKitForMac)
+#if canImport(AppKit) && !targetEnvironment(macCatalyst)
 import AppKit
 extension NSBezierPath {
     convenience init(roundedRect rect: NSRect, topLeftRadius: CGFloat, topRightRadius: CGFloat,

+ 2 - 0
Sources/Views/AnimatedImageView.swift

@@ -31,6 +31,7 @@
 //  The name and characters used in the demo of this software are property of their
 //  respective owners.
 
+#if canImport(UIKit)
 import UIKit
 import ImageIO
 
@@ -568,3 +569,4 @@ extension Array {
         return indices ~= index ? self[index] : nil
     }
 }
+#endif

+ 3 - 1
Sources/Views/Indicator.swift

@@ -24,7 +24,7 @@
 //  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 //  THE SOFTWARE.
 
-#if canImport(AppKit) && !targetEnvironment(UIKitForMac)
+#if canImport(AppKit) && !targetEnvironment(macCatalyst)
 import AppKit
 public typealias IndicatorView = NSView
 #else
@@ -120,6 +120,8 @@ final class ActivityIndicator: Indicator {
         #else
             #if os(tvOS)
                 let indicatorStyle = UIActivityIndicatorView.Style.white
+            #elseif targetEnvironment(macCatalyst)
+                let indicatorStyle = UIActivityIndicatorView.Style.medium
             #else
                 let indicatorStyle = UIActivityIndicatorView.Style.gray
             #endif