diff --git a/DGCAWallet.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/DGCAWallet.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index 0f69fab..fc8883d 100644 --- a/DGCAWallet.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/DGCAWallet.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -21,10 +21,10 @@ }, { "package": "JSONSchema", - "repositoryURL": "https://github.com/jnewc/JSONSchema.swift", + "repositoryURL": "https://github.com/eu-digital-green-certificates/JSONSchema.swift", "state": { "branch": "master", - "revision": "4637ac1cf57745c29003738f36e1b6c232fbd1a6", + "revision": "4809e8a105b3fd2818a08caf9e3cbcdd7d319af2", "version": null } }, @@ -42,8 +42,8 @@ "repositoryURL": "https://github.com/kylef/Spectre.git", "state": { "branch": null, - "revision": "f79d4ecbf8bc4e1579fbd86c3e1d652fb6876c53", - "version": "0.9.2" + "revision": "d02129a9af77729de049d328dd61e530b6f2bb2b", + "version": null } }, { diff --git a/DGCAWallet/Models/LocalData.swift b/DGCAWallet/Models/LocalData.swift index 5f642c8..69c0fa9 100644 --- a/DGCAWallet/Models/LocalData.swift +++ b/DGCAWallet/Models/LocalData.swift @@ -44,6 +44,7 @@ struct LocalData: Codable { var certStrings = [DatedCertString]() var config = Config.load() + var lastLaunchedAppVersion = Self.appVersion public func save() { Self.storage.save(self) @@ -58,13 +59,17 @@ struct LocalData: Codable { static func initialize(completion: @escaping () -> Void) { storage.loadOverride(fallback: LocalData.sharedInstance) { success in - guard let result = success else { + guard var result = success else { return } let format = l10n("log.certs-loaded") print(String.localizedStringWithFormat(format, result.certStrings.count)) + if result.lastLaunchedAppVersion != Self.appVersion { + result.config = LocalData.sharedInstance.config + } LocalData.sharedInstance = result completion() + GatewayConnection.fetchContext() } } diff --git a/context.jsonc b/context.jsonc index a61f68e..40e68fa 100644 --- a/context.jsonc +++ b/context.jsonc @@ -7,12 +7,18 @@ "privacyUrl": "https://publications.europa.eu/en/web/about-us/legal-notices/eu-mobile-apps", "context": { "url": "https://dgca-issuance-web.cfapps.eu10.hana.ondemand.com/dgca-issuance-service/context", - "pubKeys": ["Ef6tLK887tpTdkiVkSG7ioXCgNEJsbIgKcAU+dxTTag="] + "pubKeys": [ + "lKdU1EbQubxyDDm2q3N8KclZ2C94Num3xXjG0pk+3eI=", + "r/mIkG3eEpVdm+u/ko/cwxzOMo1bk4TyHIlByibiA5E=" + ] }, "endpoints": { "claim": { "url": "https://dgca-issuance-web.cfapps.eu10.hana.ondemand.com/dgca-issuance-service/dgci/wallet/claim", - "pubKeys": ["Ef6tLK887tpTdkiVkSG7ioXCgNEJsbIgKcAU+dxTTag="] + "pubKeys": [ + "lKdU1EbQubxyDDm2q3N8KclZ2C94Num3xXjG0pk+3eI=", + "r/mIkG3eEpVdm+u/ko/cwxzOMo1bk4TyHIlByibiA5E=" + ] } } },