فهرست منبع

Update code for Xcode 11 SPM

Dominique Stranz 6 سال پیش
والد
کامیت
df5a0d2bac

+ 2 - 2
Package.swift

@@ -1,9 +1,9 @@
-// swift-tools-version:5.0
+// swift-tools-version:5.1
 import PackageDescription
 
 let package = Package(
     name: "Kingfisher",
-    platforms: [.iOS("10.0"), .macOS("10.12"), .tvOS("10.0"), .watchOS("3.0")],
+    platforms: [.iOS(.v10), .macOS(.v10_12), .tvOS(.v10), .watchOS(.v3)],
     products: [
         .library(name: "Kingfisher", targets: ["Kingfisher"])
     ],

+ 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 os(macOS)
+#if canImport(AppKit)
 
 import AppKit
 

+ 2 - 0
Sources/Extensions/UIButton+Kingfisher.swift

@@ -24,6 +24,7 @@
 //  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 //  THE SOFTWARE.
 
+#if canImport(UIKit)
 import UIKit
 
 extension KingfisherWrapper where Base: UIButton {
@@ -390,3 +391,4 @@ extension KingfisherWrapper where Base: UIButton {
         return nil
     }
 }
+#endif

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

@@ -24,7 +24,7 @@
 //  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 //  THE SOFTWARE.
 
-#if os(watchOS)
+#if canImport(WatchKit)
 
 import WatchKit