ソースを参照

Fix warnings in Xcode 10.2 beta

onevcat 7 年 前
コミット
8bf7b89860

+ 1 - 0
Pods/Pods.xcodeproj/project.pbxproj

@@ -765,6 +765,7 @@
 			hasScannedForEncodings = 0;
 			hasScannedForEncodings = 0;
 			knownRegions = (
 			knownRegions = (
 				en,
 				en,
+				Base,
 			);
 			);
 			mainGroup = 7DB346D0F39D3F0E887471402A8071AB;
 			mainGroup = 7DB346D0F39D3F0E887471402A8071AB;
 			productRefGroup = 1C4A4091124A912814F6CD42EB9606FA /* Products */;
 			productRefGroup = 1C4A4091124A912814F6CD42EB9606FA /* Products */;

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

@@ -380,7 +380,7 @@ extension KingfisherWrapper where Base: ImageView {
 
 
 extension KingfisherWrapper where Base: ImageView {
 extension KingfisherWrapper where Base: ImageView {
     /// Gets the image URL bound to this image view.
     /// Gets the image URL bound to this image view.
-    @available(*, obsoleted: 5.0, message: "Use `taskIdentifier` instead to identify a setting task.")
+    @available(*, deprecated, message: "Use `taskIdentifier` instead to identify a setting task.")
     public private(set) var webURL: URL? {
     public private(set) var webURL: URL? {
         get { return nil }
         get { return nil }
         set { }
         set { }

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

@@ -351,7 +351,7 @@ extension KingfisherWrapper where Base: UIButton {
     ///
     ///
     /// - Parameter state: The state that uses the specified image.
     /// - Parameter state: The state that uses the specified image.
     /// - Returns: Current URL for image.
     /// - Returns: Current URL for image.
-    @available(*, obsoleted: 5.0, message: "Use `taskIdentifier` instead to identify a setting task.")
+    @available(*, deprecated, message: "Use `taskIdentifier` instead to identify a setting task.")
     public func webURL(for state: UIControl.State) -> URL? {
     public func webURL(for state: UIControl.State) -> URL? {
         return nil
         return nil
     }
     }
@@ -360,7 +360,7 @@ extension KingfisherWrapper where Base: UIButton {
     ///
     ///
     /// - Parameter state: The state that uses the specified background image.
     /// - Parameter state: The state that uses the specified background image.
     /// - Returns: Current URL for image.
     /// - Returns: Current URL for image.
-    @available(*, obsoleted: 5.0, message: "Use `backgroundTaskIdentifier` instead to identify a setting task.")
+    @available(*, deprecated, message: "Use `backgroundTaskIdentifier` instead to identify a setting task.")
     public func backgroundWebURL(for state: UIControl.State) -> URL? {
     public func backgroundWebURL(for state: UIControl.State) -> URL? {
         return nil
         return nil
     }
     }

+ 2 - 2
Sources/General/Deprecated.swift

@@ -436,7 +436,7 @@ extension ImageCache {
 }
 }
 
 
 // MARK: - Deprecated
 // MARK: - Deprecated
-public extension Collection where Iterator.Element == KingfisherOptionsInfoItem {
+extension Collection where Iterator.Element == KingfisherOptionsInfoItem {
     /// The queue of callbacks should happen from Kingfisher.
     /// The queue of callbacks should happen from Kingfisher.
     @available(*, deprecated, message: "Use `callbackQueue` instead.", renamed: "callbackQueue")
     @available(*, deprecated, message: "Use `callbackQueue` instead.", renamed: "callbackQueue")
     public var callbackDispatchQueue: DispatchQueue {
     public var callbackDispatchQueue: DispatchQueue {
@@ -454,7 +454,7 @@ message: "Use `.invalidHTTPStatusCode` or `isInvalidResponseStatusCode` of `King
 public let KingfisherErrorStatusCodeKey = "statusCode"
 public let KingfisherErrorStatusCodeKey = "statusCode"
 
 
 // MARK: - Deprecated
 // MARK: - Deprecated
-public extension Collection where Iterator.Element == KingfisherOptionsInfoItem {
+extension Collection where Iterator.Element == KingfisherOptionsInfoItem {
     /// The target `ImageCache` which is used.
     /// The target `ImageCache` which is used.
     @available(*, deprecated,
     @available(*, deprecated,
     message: "Create a `KingfisherParsedOptionsInfo` from `KingfisherOptionsInfo` and use `targetCache` instead.")
     message: "Create a `KingfisherParsedOptionsInfo` from `KingfisherOptionsInfo` and use `targetCache` instead.")

+ 1 - 1
Sources/General/Kingfisher.swift

@@ -60,7 +60,7 @@ public struct KingfisherWrapper<Base> {
 /// value in the namespace of Kingfisher.
 /// value in the namespace of Kingfisher.
 public protocol KingfisherCompatible { }
 public protocol KingfisherCompatible { }
 
 
-public extension KingfisherCompatible {
+extension KingfisherCompatible {
     
     
     /// Gets a namespace holder for Kingfisher compatible types.
     /// Gets a namespace holder for Kingfisher compatible types.
     public var kf: KingfisherWrapper<Self> {
     public var kf: KingfisherWrapper<Self> {

+ 1 - 1
Sources/General/KingfisherError.swift

@@ -26,7 +26,7 @@
 
 
 import Foundation
 import Foundation
 
 
-extension Never: Error {}
+extension Never {}
 
 
 /// Represents all the errors which can happen in Kingfisher framework.
 /// Represents all the errors which can happen in Kingfisher framework.
 /// Kingfisher related methods always throw a `KingfisherError` or invoke the callback with `KingfisherError`
 /// Kingfisher related methods always throw a `KingfisherError` or invoke the callback with `KingfisherError`

+ 1 - 1
Sources/Image/Image.swift

@@ -218,7 +218,7 @@ extension KingfisherWrapper where Base: Image {
         return image
         return image
         #else
         #else
         
         
-        let image: Image?
+        var image: Image?
         if options.preloadAll || options.onlyFirstFrame {
         if options.preloadAll || options.onlyFirstFrame {
             // Use `images` image if you want to preload all animated data
             // Use `images` image if you want to preload all animated data
             guard let animatedImage = GIFAnimatedImage(from: imageSource, for: info, options: options) else {
             guard let animatedImage = GIFAnimatedImage(from: imageSource, for: info, options: options) else {

+ 1 - 1
Sources/Image/ImageProcessor.swift

@@ -104,7 +104,7 @@ extension ImageProcessor {
     }
     }
 }
 }
 
 
-public extension ImageProcessor {
+extension ImageProcessor {
     
     
     /// Appends an `ImageProcessor` to another. The identifier of the new `ImageProcessor`
     /// Appends an `ImageProcessor` to another. The identifier of the new `ImageProcessor`
     /// will be "\(self.identifier)|>\(another.identifier)".
     /// will be "\(self.identifier)|>\(another.identifier)".