diff --git a/API b/API new file mode 120000 index 00000000..6a393c30 --- /dev/null +++ b/API @@ -0,0 +1 @@ +PassepartoutCore/Sources/PassepartoutServices/API/ \ No newline at end of file diff --git a/PassepartoutCore/Sources/PassepartoutProviders/Managers/ProviderManager.swift b/PassepartoutCore/Sources/PassepartoutProviders/Managers/ProviderManager.swift index 9104ba04..ad2233c0 100644 --- a/PassepartoutCore/Sources/PassepartoutProviders/Managers/ProviderManager.swift +++ b/PassepartoutCore/Sources/PassepartoutProviders/Managers/ProviderManager.swift @@ -171,9 +171,9 @@ public class ProviderManager: ObservableObject, RateLimited { .eraseToAnyPublisher() } - guard self.appBuild >= infrastructure.buildNumber else { - pp_log.error("Infrastructure requires app build >= \(infrastructure.buildNumber) (app is \(self.appBuild))") - return Fail(error: ProviderManagerError.outdatedBuild(self.appBuild, infrastructure.buildNumber)) + guard self.appBuild >= infrastructure.build else { + pp_log.error("Infrastructure requires app build >= \(infrastructure.build) (app is \(self.appBuild))") + return Fail(error: ProviderManagerError.outdatedBuild(self.appBuild, infrastructure.build)) .eraseToAnyPublisher() } diff --git a/PassepartoutCore/Sources/PassepartoutServices/DataModels/WSProviderInfrastructure.swift b/PassepartoutCore/Sources/PassepartoutServices/DataModels/WSProviderInfrastructure.swift index c7dcd64d..ac3e097a 100644 --- a/PassepartoutCore/Sources/PassepartoutServices/DataModels/WSProviderInfrastructure.swift +++ b/PassepartoutCore/Sources/PassepartoutServices/DataModels/WSProviderInfrastructure.swift @@ -38,17 +38,7 @@ public struct WSProviderInfrastructure: Codable { public let countryCode: String } - public let build: [String: Int] - - public var buildNumber: Int { - var num: Int? - #if os(iOS) - num = build["ios"] - #else - num = build["macos"] - #endif - return num ?? 0 - } + public let build: Int public let name: WSProviderName