Reject API response requiring more recent build
This commit is contained in:
parent
567ddd9b12
commit
8d1acda11a
|
@ -43,6 +43,8 @@ struct Infrastructure: Codable {
|
||||||
let preset: String
|
let preset: String
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let build: Int
|
||||||
|
|
||||||
let name: Name
|
let name: Name
|
||||||
|
|
||||||
let pools: [Pool]
|
let pools: [Pool]
|
||||||
|
|
|
@ -143,6 +143,14 @@ class InfrastructureFactory {
|
||||||
}
|
}
|
||||||
return
|
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
|
var isNewer = true
|
||||||
if let bundleDate = self.bundleModificationDate(for: name) {
|
if let bundleDate = self.bundleModificationDate(for: name) {
|
||||||
|
|
Loading…
Reference in New Issue