diff --git a/Package.swift b/Package.swift index c2b750e..e5f11e5 100644 --- a/Package.swift +++ b/Package.swift @@ -21,7 +21,7 @@ let package = Package( dependencies: [ .package( url: "https://github.com/firebase/firebase-ios-sdk.git", - .upToNextMajor(from: "9.0.0") + .upToNextMajor(from: "10.0.0") ), ], targets: [ diff --git a/Tests/SwiftyRemoteConfigTests/Helpers/SwiftyRemoteConfig+Workaround.swift b/Tests/SwiftyRemoteConfigTests/Helpers/SwiftyRemoteConfig+Workaround.swift deleted file mode 100644 index 9f08d12..0000000 --- a/Tests/SwiftyRemoteConfigTests/Helpers/SwiftyRemoteConfig+Workaround.swift +++ /dev/null @@ -1,85 +0,0 @@ -// -// SwiftyRemoteConfig+Workaround.swift -// -// -// Created by Fumito Ito on 2022/05/14. -// - -import Foundation -import SwiftyRemoteConfig - -extension RemoteConfigSerializable { - public static var _remoteConfigArray: RemoteConfigArrayBridge<[T]> { RemoteConfigArrayBridge() } -} - -extension Date: RemoteConfigSerializable { - public static var _remoteConfig: RemoteConfigObjectBridge { RemoteConfigObjectBridge() } -} - -extension String: RemoteConfigSerializable { - public static var _remoteConfig: RemoteConfigStringBridge { RemoteConfigStringBridge() } -} - -extension Int: RemoteConfigSerializable { - public static var _remoteConfig: RemoteConfigIntBridge { RemoteConfigIntBridge() } -} - -extension Double: RemoteConfigSerializable { - public static var _remoteConfig: RemoteConfigDoubleBridge { return RemoteConfigDoubleBridge() } -} - -extension Bool: RemoteConfigSerializable { - public static var _remoteConfig: RemoteConfigBoolBridge { RemoteConfigBoolBridge() } -} - -extension Data: RemoteConfigSerializable { - public static var _remoteConfig: RemoteConfigDataBridge { RemoteConfigDataBridge() } -} - -extension URL: RemoteConfigSerializable { - public static var _remoteConfig: RemoteConfigUrlBridge { RemoteConfigUrlBridge() } - public static var _remoteConfigArray: RemoteConfigCodableBridge<[URL]> { RemoteConfigCodableBridge() } -} - -extension RemoteConfigSerializable where Self: Codable { - public static var _remoteConfig: RemoteConfigCodableBridge { RemoteConfigCodableBridge() } - public static var _remoteConfigArray: RemoteConfigCodableBridge<[Self]> { RemoteConfigCodableBridge() } -} - -extension RemoteConfigSerializable where Self: RawRepresentable { - public static var _remoteConfig: RemoteConfigRawRepresentableBridge { RemoteConfigRawRepresentableBridge() } - public static var _remoteConfigArray: RemoteConfigRawRepresentableArrayBridge<[Self]> { RemoteConfigRawRepresentableArrayBridge() } -} - -extension RemoteConfigSerializable where Self: NSCoding { - public static var _remoteConfig: RemoteConfigKeyedArchiverBridge { RemoteConfigKeyedArchiverBridge() } - public static var _remoteConfigArray: RemoteConfigKeyedArchiverArrayBridge<[Self]> { RemoteConfigKeyedArchiverArrayBridge() } -} - -extension Dictionary: RemoteConfigSerializable where Key == String { - public typealias T = [Key: Value] - public typealias Bridge = RemoteConfigObjectBridge - public typealias ArrayBridge = RemoteConfigArrayBridge<[T]> - - public static var _remoteConfig: Bridge { Bridge() } - public static var _remoteConfigArray: ArrayBridge { ArrayBridge() } -} - -extension Array: RemoteConfigSerializable where Element: RemoteConfigSerializable { - public typealias T = [Element.T] - public typealias Bridge = Element.ArrayBridge - public typealias ArrayBridge = RemoteConfigObjectBridge<[T]> - - public static var _remoteConfig: Bridge { Element._remoteConfigArray } - public static var _remoteConfigArray: ArrayBridge { - fatalError("Multidimensional arrays are not supported yet") - } -} - -extension Optional: RemoteConfigSerializable where Wrapped: RemoteConfigSerializable { - public typealias Bridge = RemoteConfigOptionalBridge - public typealias ArrayBridge = RemoteConfigOptionalBridge - - public static var _remoteConfig: Bridge { RemoteConfigOptionalBridge(bridge: Wrapped._remoteConfig) } - public static var _remoteConfigArray: ArrayBridge { RemoteConfigOptionalBridge(bridge: Wrapped._remoteConfigArray) } -}