diff --git a/EhPanda.xcodeproj/project.pbxproj b/EhPanda.xcodeproj/project.pbxproj index 15c18f3b..1daf0be1 100644 --- a/EhPanda.xcodeproj/project.pbxproj +++ b/EhPanda.xcodeproj/project.pbxproj @@ -7,6 +7,7 @@ objects = { /* Begin PBXBuildFile section */ + 82F69C912F12815E00A7F9E4 /* KingfisherWebP in Frameworks */ = {isa = PBXBuildFile; productRef = 82F69C902F12815E00A7F9E4 /* KingfisherWebP */; }; AB0929B6277F043D00F107CA /* AccountSettingReducer.swift in Sources */ = {isa = PBXBuildFile; fileRef = AB0929B5277F043D00F107CA /* AccountSettingReducer.swift */; }; AB0929BE2780032400F107CA /* EhSettingReducer.swift in Sources */ = {isa = PBXBuildFile; fileRef = AB0929BD2780032400F107CA /* EhSettingReducer.swift */; }; AB0929C027805A8200F107CA /* LoginReducer.swift in Sources */ = {isa = PBXBuildFile; fileRef = AB0929BF27805A8200F107CA /* LoginReducer.swift */; }; @@ -635,6 +636,7 @@ ABD49D5D277C6C9D003D1A07 /* SFSafeSymbols in Frameworks */, ABAC82FE26BC4A96009F5026 /* OpenCC in Frameworks */, AB86AC1027831AD100E61E6A /* ComposableArchitecture in Frameworks */, + 82F69C912F12815E00A7F9E4 /* KingfisherWebP in Frameworks */, ABBB2636278FB888007B6149 /* SwiftUINavigation in Frameworks */, AB1FA94927C62BC80063EF55 /* CommonMark in Frameworks */, AB17573D27675B1E00FD64E2 /* Colorful in Frameworks */, @@ -1590,6 +1592,7 @@ AB2EB9A1280251F600011A8A /* AlertKit */, AB2EB9A42802521700011A8A /* DeprecatedAPI */, EAE63E2029E2A6330048C601 /* SwiftyBeaver */, + 82F69C902F12815E00A7F9E4 /* KingfisherWebP */, ); productName = EhPanda; productReference = ABC3C7542593696C00E0C11B /* EhPanda.app */; @@ -1668,6 +1671,7 @@ AB2EB9A0280251F600011A8A /* XCRemoteSwiftPackageReference "AlertKit" */, AB2EB9A32802521700011A8A /* XCRemoteSwiftPackageReference "DeprecatedAPI" */, EAE63E1F29E2A6330048C601 /* XCRemoteSwiftPackageReference "SwiftyBeaver" */, + 8268CA182F127FF900AE0557 /* XCRemoteSwiftPackageReference "KingfisherWebP" */, ); productRefGroup = ABC3C7552593696C00E0C11B /* Products */; projectDirPath = ""; @@ -2414,6 +2418,14 @@ /* End XCConfigurationList section */ /* Begin XCRemoteSwiftPackageReference section */ + 8268CA182F127FF900AE0557 /* XCRemoteSwiftPackageReference "KingfisherWebP" */ = { + isa = XCRemoteSwiftPackageReference; + repositoryURL = "https://github.com/yeatse/KingfisherWebP"; + requirement = { + kind = upToNextMajorVersion; + minimumVersion = 1.7.2; + }; + }; AB17573B27675B1E00FD64E2 /* XCRemoteSwiftPackageReference "Colorful" */ = { isa = XCRemoteSwiftPackageReference; repositoryURL = "https://github.com/Co2333/Colorful"; @@ -2515,7 +2527,7 @@ repositoryURL = "https://github.com/onevcat/Kingfisher"; requirement = { kind = upToNextMajorVersion; - minimumVersion = 7.0.0; + minimumVersion = 8.0.0; }; }; ABD49D5B277C6C9D003D1A07 /* XCRemoteSwiftPackageReference "SFSafeSymbols" */ = { @@ -2545,6 +2557,11 @@ /* End XCRemoteSwiftPackageReference section */ /* Begin XCSwiftPackageProductDependency section */ + 82F69C902F12815E00A7F9E4 /* KingfisherWebP */ = { + isa = XCSwiftPackageProductDependency; + package = 8268CA182F127FF900AE0557 /* XCRemoteSwiftPackageReference "KingfisherWebP" */; + productName = KingfisherWebP; + }; AB17573C27675B1E00FD64E2 /* Colorful */ = { isa = XCSwiftPackageProductDependency; package = AB17573B27675B1E00FD64E2 /* XCRemoteSwiftPackageReference "Colorful" */; diff --git a/EhPanda.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/EhPanda.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index a94821f1..733b61c1 100644 --- a/EhPanda.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/EhPanda.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -1,5 +1,5 @@ { - "originHash" : "d2c86e73cf55b52b5883b87c93943d803ad451433deeaa7ca1c32e53b38a2565", + "originHash" : "d8355fc0c76cd2bde5ab18aa105d9b049e69e07f4575abbebc2bf23f23270cfa", "pins" : [ { "identity" : "alertkit", @@ -24,8 +24,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/pointfreeco/combine-schedulers", "state" : { - "revision" : "5928286acce13def418ec36d05a001a9641086f2", - "version" : "1.0.3" + "revision" : "fd16d76fd8b9a976d88bfb6cacc05ca8d19c91b6", + "version" : "1.1.0" } }, { @@ -60,8 +60,26 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/onevcat/Kingfisher", "state" : { - "revision" : "2ef543ee21d63734e1c004ad6c870255e8716c50", - "version" : "7.12.0" + "revision" : "d30a5fad881137e2267f96a8e3fc35c58999bb94", + "version" : "8.6.2" + } + }, + { + "identity" : "kingfisherwebp", + "kind" : "remoteSourceControl", + "location" : "https://github.com/yeatse/KingfisherWebP", + "state" : { + "revision" : "917513a49391052d94da59697aae0e65c68d35bc", + "version" : "1.7.2" + } + }, + { + "identity" : "libwebp-xcode", + "kind" : "remoteSourceControl", + "location" : "https://github.com/SDWebImage/libwebp-Xcode.git", + "state" : { + "revision" : "0d60654eeefd5d7d2bef3835804892c40225e8b2", + "version" : "1.5.0" } }, { @@ -105,8 +123,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/pointfreeco/swift-composable-architecture", "state" : { - "revision" : "a9c3fecb5d31fc8aad5d8ba5d830924966d7fb15", - "version" : "1.23.0" + "revision" : "5b0890fabfd68a2d375d68502bc3f54a8548c494", + "version" : "1.23.1" } }, { @@ -249,8 +267,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/pointfreeco/xctest-dynamic-overlay", "state" : { - "revision" : "4c27acf5394b645b70d8ba19dc249c0472d5f618", - "version" : "1.7.0" + "revision" : "34e463e98ab8541c604af706c99bed7160f5ec70", + "version" : "1.8.1" } } ], diff --git a/EhPanda/App/Tools/Clients/LibraryClient.swift b/EhPanda/App/Tools/Clients/LibraryClient.swift index 85ccc136..af0a9e81 100644 --- a/EhPanda/App/Tools/Clients/LibraryClient.swift +++ b/EhPanda/App/Tools/Clients/LibraryClient.swift @@ -10,6 +10,7 @@ import Kingfisher import SwiftyBeaver import UIImageColors import ComposableArchitecture +import KingfisherWebP struct LibraryClient { let initializeLogger: () -> Void @@ -54,6 +55,10 @@ extension LibraryClient { let config = KingfisherManager.shared.downloader.sessionConfiguration config.httpCookieStorage = HTTPCookieStorage.shared KingfisherManager.shared.downloader.sessionConfiguration = config + KingfisherManager.shared.defaultOptions += [ + .processor(WebPProcessor.default), + .cacheSerializer(WebPSerializer.default) + ] }, clearWebImageDiskCache: { KingfisherManager.shared.cache.clearDiskCache()