diff --git a/Passepartout/Sources/Services/Infrastructure.swift b/Passepartout/Sources/Services/Infrastructure.swift index 4dee2aca..30af0b36 100644 --- a/Passepartout/Sources/Services/Infrastructure.swift +++ b/Passepartout/Sources/Services/Infrastructure.swift @@ -43,6 +43,8 @@ struct Infrastructure: Codable { let preset: String } + let build: Int + let name: Name let pools: [Pool] diff --git a/Passepartout/Sources/Services/InfrastructureFactory.swift b/Passepartout/Sources/Services/InfrastructureFactory.swift index 819450b7..cbcecdce 100644 --- a/Passepartout/Sources/Services/InfrastructureFactory.swift +++ b/Passepartout/Sources/Services/InfrastructureFactory.swift @@ -143,6 +143,14 @@ class InfrastructureFactory { } return } + let appBuild = GroupConstants.App.buildNumber + guard appBuild >= infra.build else { + log.error("Response requires app build >= \(infra.build) (found \(appBuild))") + DispatchQueue.main.async { + completionHandler(nil, error) + } + return + } var isNewer = true if let bundleDate = self.bundleModificationDate(for: name) {