Skip to content

Commit

Permalink
Conditional compile for old SDKs
Browse files Browse the repository at this point in the history
  • Loading branch information
onevcat committed Jan 3, 2021
1 parent bc85586 commit b52bc34
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Kingfisher.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Pod::Spec.new do |s|
s.license = { :type => "MIT", :file => "LICENSE" }

s.authors = { "onevcat" => "[email protected]" }
s.social_media_url = "https://twitter.com/onevcat"
s.social_media_url = "https://github.com/onevcat"

s.swift_version = "5.0"
s.swift_versions = ['4.0', '4.2', '5.0']
Expand Down
2 changes: 2 additions & 0 deletions Sources/General/KFOptionsSetter.swift
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ extension KF.Builder: KFOptionSetter {
public var delegateObserver: AnyObject { self }
}

#if canImport(SwiftUI) && canImport(Combine)
@available(iOS 13.0, OSX 10.15, tvOS 13.0, watchOS 6.0, *)
extension KFImage: KFOptionSetter {
public var options: KingfisherParsedOptionsInfo {
Expand All @@ -54,6 +55,7 @@ extension KFImage: KFOptionSetter {

public var delegateObserver: AnyObject { binder }
}
#endif

// MARK: - Life cycles
extension KFOptionSetter {
Expand Down
2 changes: 2 additions & 0 deletions Sources/SwiftUI/KFImageOptions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.

#if canImport(SwiftUI) && canImport(Combine)
import SwiftUI

// MARK: - KFImage creating.
Expand Down Expand Up @@ -125,3 +126,4 @@ extension KFImage {
return result
}
}
#endif

0 comments on commit b52bc34

Please sign in to comment.