From 8a5f3dd3c5ca921933182802fc7bac2964ce0a29 Mon Sep 17 00:00:00 2001 From: Kai Maschke Date: Fri, 28 Jul 2023 12:56:24 +0200 Subject: [PATCH] Additionally added availability check for macOS, watchOS and macCatalyst --- Sources/Utility/String+SHA256.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/Utility/String+SHA256.swift b/Sources/Utility/String+SHA256.swift index 9230b02a5..8898df1de 100644 --- a/Sources/Utility/String+SHA256.swift +++ b/Sources/Utility/String+SHA256.swift @@ -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 {