Skip to content

Commit

Permalink
Additionally added availability check for macOS, watchOS and macCatalyst
Browse files Browse the repository at this point in the history
  • Loading branch information
Kai Maschke committed Jul 28, 2023
1 parent ed546d6 commit 8a5f3dd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Sources/Utility/String+SHA256.swift
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ extension String: KingfisherCompatibleValue { }
extension KingfisherWrapper where Base == String {
var sha256: String {
guard let data = base.data(using: .utf8) else { return base }
if #available(iOS 13.0, tvOS 13.0, *) {
if #available(iOS 13.0, tvOS 13.0, macOS 10.15, watchOS 6.0, macCatalyst 13.0, *) {
let hashed = SHA256.hash(data: data)
return hashed.compactMap { String(format: "%02x", $0) }.joined()
} else {
Expand Down

0 comments on commit 8a5f3dd

Please sign in to comment.