From 066e04802221babe1dcb56588b1b82af1047ddd2 Mon Sep 17 00:00:00 2001 From: Arkadiusz Fal Date: Thu, 24 Mar 2022 14:03:38 +0100 Subject: [PATCH] Add Defaults workaround --- Shared/Defaults+Workaround.swift | 38 +++ Yattee.xcodeproj/project.pbxproj | 8 + .../xcshareddata/swiftpm/Package.resolved | 258 +++++++++--------- 3 files changed, 174 insertions(+), 130 deletions(-) create mode 100644 Shared/Defaults+Workaround.swift diff --git a/Shared/Defaults+Workaround.swift b/Shared/Defaults+Workaround.swift new file mode 100644 index 00000000..2d6f974e --- /dev/null +++ b/Shared/Defaults+Workaround.swift @@ -0,0 +1,38 @@ +import Defaults +import Foundation + +extension Defaults.Serializable where Self: Codable { + static var bridge: Defaults.TopLevelCodableBridge { Defaults.TopLevelCodableBridge() } +} + +extension Defaults.Serializable where Self: Codable & NSSecureCoding { + static var bridge: Defaults.CodableNSSecureCodingBridge { Defaults.CodableNSSecureCodingBridge() } +} + +extension Defaults.Serializable where Self: Codable & NSSecureCoding & Defaults.PreferNSSecureCoding { + static var bridge: Defaults.NSSecureCodingBridge { Defaults.NSSecureCodingBridge() } +} + +extension Defaults.Serializable where Self: Codable & RawRepresentable { + static var bridge: Defaults.RawRepresentableCodableBridge { Defaults.RawRepresentableCodableBridge() } +} + +extension Defaults.Serializable where Self: Codable & RawRepresentable & Defaults.PreferRawRepresentable { + static var bridge: Defaults.RawRepresentableBridge { Defaults.RawRepresentableBridge() } +} + +extension Defaults.Serializable where Self: RawRepresentable { + static var bridge: Defaults.RawRepresentableBridge { Defaults.RawRepresentableBridge() } +} + +extension Defaults.Serializable where Self: NSSecureCoding { + static var bridge: Defaults.NSSecureCodingBridge { Defaults.NSSecureCodingBridge() } +} + +extension Defaults.CollectionSerializable where Element: Defaults.Serializable { + static var bridge: Defaults.CollectionBridge { Defaults.CollectionBridge() } +} + +extension Defaults.SetAlgebraSerializable where Element: Defaults.Serializable & Hashable { + static var bridge: Defaults.SetAlgebraBridge { Defaults.SetAlgebraBridge() } +} diff --git a/Yattee.xcodeproj/project.pbxproj b/Yattee.xcodeproj/project.pbxproj index 14e88b96..0135ef44 100644 --- a/Yattee.xcodeproj/project.pbxproj +++ b/Yattee.xcodeproj/project.pbxproj @@ -514,6 +514,9 @@ 37D526E02720AC4400ED2F5E /* VideosAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37D526DD2720AC4400ED2F5E /* VideosAPI.swift */; }; 37D526E32720B4BE00ED2F5E /* View+SwipeGesture.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37D526E22720B4BE00ED2F5E /* View+SwipeGesture.swift */; }; 37D526E42720B4BE00ED2F5E /* View+SwipeGesture.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37D526E22720B4BE00ED2F5E /* View+SwipeGesture.swift */; }; + 37D6F3A127ECA1FF006FE38B /* Defaults+Workaround.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37D6F3A027ECA1FF006FE38B /* Defaults+Workaround.swift */; }; + 37D6F3A227ECA1FF006FE38B /* Defaults+Workaround.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37D6F3A027ECA1FF006FE38B /* Defaults+Workaround.swift */; }; + 37D6F3A327ECA1FF006FE38B /* Defaults+Workaround.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37D6F3A027ECA1FF006FE38B /* Defaults+Workaround.swift */; }; 37DD87C7271C9CFE0027CBF9 /* PlayerStreams.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37DD87C6271C9CFE0027CBF9 /* PlayerStreams.swift */; }; 37DD87C8271C9CFE0027CBF9 /* PlayerStreams.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37DD87C6271C9CFE0027CBF9 /* PlayerStreams.swift */; }; 37DD87C9271C9CFE0027CBF9 /* PlayerStreams.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37DD87C6271C9CFE0027CBF9 /* PlayerStreams.swift */; }; @@ -791,6 +794,7 @@ 37D4B1AE26729DEB00C925CA /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 37D526DD2720AC4400ED2F5E /* VideosAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VideosAPI.swift; sourceTree = ""; }; 37D526E22720B4BE00ED2F5E /* View+SwipeGesture.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "View+SwipeGesture.swift"; sourceTree = ""; }; + 37D6F3A027ECA1FF006FE38B /* Defaults+Workaround.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Defaults+Workaround.swift"; sourceTree = ""; }; 37D9169A27388A81002B1BAA /* README.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = ""; }; 37DD87C6271C9CFE0027CBF9 /* PlayerStreams.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PlayerStreams.swift; sourceTree = ""; }; 37DD9DA22785BBC900539416 /* NoCommentsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NoCommentsView.swift; sourceTree = ""; }; @@ -1257,6 +1261,7 @@ 371AAE2826CEC7D900901972 /* Views */, 375168D52700FAFF008F96A6 /* Debounce.swift */, 372915E52687E3B900F5A35B /* Defaults.swift */, + 37D6F3A027ECA1FF006FE38B /* Defaults+Workaround.swift */, 3761ABFC26F0F8DE00AA496F /* EnvironmentValues.swift */, 3729037D2739E47400EA99F6 /* MenuCommands.swift */, 37B7958F2771DAE0001CF27B /* OpenURLHandler.swift */, @@ -2009,6 +2014,7 @@ 37484C2526FC83E000287258 /* InstanceForm.swift in Sources */, 37DD9DBD2785D60300539416 /* ScrollViewMatcher.swift in Sources */, 37B767DB2677C3CA0098BAA8 /* PlayerModel.swift in Sources */, + 37D6F3A127ECA1FF006FE38B /* Defaults+Workaround.swift in Sources */, 3788AC2726F6840700F6BAA9 /* FavoriteItemView.swift in Sources */, 375DFB5826F9DA010013F468 /* InstancesModel.swift in Sources */, 37DD9DC62785D63A00539416 /* UIResponder+Extensions.swift in Sources */, @@ -2099,6 +2105,7 @@ 37484C3226FCB8F900287258 /* AccountValidator.swift in Sources */, 378AE944274EF00A006A4EE1 /* Color+Background.swift in Sources */, 37F49BA426CAA59B00304AC0 /* Playlist+Fixtures.swift in Sources */, + 37D6F3A227ECA1FF006FE38B /* Defaults+Workaround.swift in Sources */, 37EAD870267B9ED100D9E01B /* Segment.swift in Sources */, 3788AC2826F6840700F6BAA9 /* FavoriteItemView.swift in Sources */, 378AE93A274EDFAF006A4EE1 /* Badge+Backport.swift in Sources */, @@ -2379,6 +2386,7 @@ 37CEE4C32677B697005A1EFE /* Stream.swift in Sources */, 37F64FE626FE70A60081B69E /* RedrawOnModifier.swift in Sources */, 37B2631C2735EAAB00FE0D40 /* FavoriteResourceObserver.swift in Sources */, + 37D6F3A327ECA1FF006FE38B /* Defaults+Workaround.swift in Sources */, 37484C2B26FC83FF00287258 /* AccountForm.swift in Sources */, 37FB2860272225E800A57617 /* ContentItemView.swift in Sources */, 374C053727242D9F009BDDBE /* SponsorBlockSettings.swift in Sources */, diff --git a/Yattee.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/Yattee.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index f1f68be7..73564d67 100644 --- a/Yattee.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/Yattee.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -1,133 +1,131 @@ { - "object": { - "pins": [ - { - "package": "Alamofire", - "repositoryURL": "https://github.com/Alamofire/Alamofire.git", - "state": { - "branch": null, - "revision": "f82c23a8a7ef8dc1a49a8bfc6a96883e79121864", - "version": "5.5.0" - } - }, - { - "package": "Defaults", - "repositoryURL": "https://github.com/sindresorhus/Defaults", - "state": { - "branch": null, - "revision": "55f3302c3ab30a8760f10042d0ebc0a6907f865a", - "version": "6.1.0" - } - }, - { - "package": "libwebp", - "repositoryURL": "https://github.com/SDWebImage/libwebp-Xcode.git", - "state": { - "branch": null, - "revision": "2b3b43faaef54d1b897482428428357b7f7cd08b", - "version": "1.2.1" - } - }, - { - "package": "PINCache", - "repositoryURL": "https://github.com/pinterest/PINCache", - "state": { - "branch": "master", - "revision": "9ca06045b5aff12ee8c0ef5880aa8469c4896144", - "version": null - } - }, - { - "package": "PINOperation", - "repositoryURL": "https://github.com/pinterest/PINOperation.git", - "state": { - "branch": null, - "revision": "44d8ca154a4e75a028a5548c31ff3a53b90cef15", - "version": "1.2.1" - } - }, - { - "package": "SDWebImage", - "repositoryURL": "https://github.com/SDWebImage/SDWebImage.git", - "state": { - "branch": null, - "revision": "0fff0d7505b5306348263ea64fcc561253bbeb21", - "version": "5.12.2" - } - }, - { - "package": "SDWebImagePINPlugin", - "repositoryURL": "https://github.com/SDWebImage/SDWebImagePINPlugin.git", - "state": { - "branch": null, - "revision": "bd73a4fb30352ec311303d811559c9c46df4caa4", - "version": "0.3.0" - } - }, - { - "package": "SDWebImageSwiftUI", - "repositoryURL": "https://github.com/SDWebImage/SDWebImageSwiftUI.git", - "state": { - "branch": null, - "revision": "cd8625b7cf11a97698e180d28bb7d5d357196678", - "version": "2.0.2" - } - }, - { - "package": "SDWebImageWebPCoder", - "repositoryURL": "https://github.com/SDWebImage/SDWebImageWebPCoder.git", - "state": { - "branch": null, - "revision": "95a6838df13bc08d8064cf7e048b787b6e52348d", - "version": "0.8.4" - } - }, - { - "package": "Siesta", - "repositoryURL": "https://github.com/bustoutsolutions/siesta", - "state": { - "branch": null, - "revision": "43f34046ebb5beb6802200353c473af303bbc31e", - "version": "1.5.2" - } - }, - { - "package": "Sparkle", - "repositoryURL": "https://github.com/sparkle-project/Sparkle", - "state": { - "branch": "2.x", - "revision": "71fc8d7b1182d24879edacefccb06151e99c34fe", - "version": null - } - }, - { - "package": "swift-log", - "repositoryURL": "https://github.com/apple/swift-log.git", - "state": { - "branch": null, - "revision": "5d66f7ba25daf4f94100e7022febf3c75e37a6c7", - "version": "1.4.2" - } - }, - { - "package": "Introspect", - "repositoryURL": "https://github.com/siteline/SwiftUI-Introspect.git", - "state": { - "branch": null, - "revision": "2e09be8af614401bc9f87d40093ec19ce56ccaf2", - "version": "0.1.3" - } - }, - { - "package": "SwiftyJSON", - "repositoryURL": "https://github.com/SwiftyJSON/SwiftyJSON.git", - "state": { - "branch": null, - "revision": "b3dcd7dbd0d488e1a7077cb33b00f2083e382f07", - "version": "5.0.1" - } + "pins" : [ + { + "identity" : "alamofire", + "kind" : "remoteSourceControl", + "location" : "https://github.com/Alamofire/Alamofire.git", + "state" : { + "revision" : "f82c23a8a7ef8dc1a49a8bfc6a96883e79121864", + "version" : "5.5.0" } - ] - }, - "version": 1 + }, + { + "identity" : "defaults", + "kind" : "remoteSourceControl", + "location" : "https://github.com/sindresorhus/Defaults", + "state" : { + "revision" : "119f654d44f7b90f00dc11f7dd1c94a36f12576b", + "version" : "6.2.1" + } + }, + { + "identity" : "libwebp-xcode", + "kind" : "remoteSourceControl", + "location" : "https://github.com/SDWebImage/libwebp-Xcode.git", + "state" : { + "revision" : "2b3b43faaef54d1b897482428428357b7f7cd08b", + "version" : "1.2.1" + } + }, + { + "identity" : "pincache", + "kind" : "remoteSourceControl", + "location" : "https://github.com/pinterest/PINCache", + "state" : { + "branch" : "master", + "revision" : "9ca06045b5aff12ee8c0ef5880aa8469c4896144" + } + }, + { + "identity" : "pinoperation", + "kind" : "remoteSourceControl", + "location" : "https://github.com/pinterest/PINOperation.git", + "state" : { + "revision" : "44d8ca154a4e75a028a5548c31ff3a53b90cef15", + "version" : "1.2.1" + } + }, + { + "identity" : "sdwebimage", + "kind" : "remoteSourceControl", + "location" : "https://github.com/SDWebImage/SDWebImage.git", + "state" : { + "revision" : "2e63d0061da449ad0ed130768d05dceb1496de44", + "version" : "5.12.5" + } + }, + { + "identity" : "sdwebimagepinplugin", + "kind" : "remoteSourceControl", + "location" : "https://github.com/SDWebImage/SDWebImagePINPlugin.git", + "state" : { + "revision" : "bd73a4fb30352ec311303d811559c9c46df4caa4", + "version" : "0.3.0" + } + }, + { + "identity" : "sdwebimageswiftui", + "kind" : "remoteSourceControl", + "location" : "https://github.com/SDWebImage/SDWebImageSwiftUI.git", + "state" : { + "revision" : "cd8625b7cf11a97698e180d28bb7d5d357196678", + "version" : "2.0.2" + } + }, + { + "identity" : "sdwebimagewebpcoder", + "kind" : "remoteSourceControl", + "location" : "https://github.com/SDWebImage/SDWebImageWebPCoder.git", + "state" : { + "revision" : "95a6838df13bc08d8064cf7e048b787b6e52348d", + "version" : "0.8.4" + } + }, + { + "identity" : "siesta", + "kind" : "remoteSourceControl", + "location" : "https://github.com/bustoutsolutions/siesta", + "state" : { + "revision" : "43f34046ebb5beb6802200353c473af303bbc31e", + "version" : "1.5.2" + } + }, + { + "identity" : "sparkle", + "kind" : "remoteSourceControl", + "location" : "https://github.com/sparkle-project/Sparkle", + "state" : { + "branch" : "2.x", + "revision" : "f250bead4b943ef9711c61274a1f52e380afa0e8" + } + }, + { + "identity" : "swift-log", + "kind" : "remoteSourceControl", + "location" : "https://github.com/apple/swift-log.git", + "state" : { + "revision" : "5d66f7ba25daf4f94100e7022febf3c75e37a6c7", + "version" : "1.4.2" + } + }, + { + "identity" : "swiftui-introspect", + "kind" : "remoteSourceControl", + "location" : "https://github.com/siteline/SwiftUI-Introspect.git", + "state" : { + "revision" : "f2616860a41f9d9932da412a8978fec79c06fe24", + "version" : "0.1.4" + } + }, + { + "identity" : "swiftyjson", + "kind" : "remoteSourceControl", + "location" : "https://github.com/SwiftyJSON/SwiftyJSON.git", + "state" : { + "revision" : "b3dcd7dbd0d488e1a7077cb33b00f2083e382f07", + "version" : "5.0.1" + } + } + ], + "version" : 2 }