From 4c262ac7d484fcc289f9744a99b16ed599ccfcbf Mon Sep 17 00:00:00 2001 From: iMac0de Date: Tue, 11 Aug 2020 12:07:19 +0200 Subject: [PATCH] Fix an issue which was not caching the data anymore --- AppStoreVersion/AppStoreVersion.swift | 4 ++++ AppStoreVersion/en.lproj/Localizable.strings | 2 +- AppStoreVersion/fr.lproj/Localizable.strings | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/AppStoreVersion/AppStoreVersion.swift b/AppStoreVersion/AppStoreVersion.swift index 5b04867..58a935f 100644 --- a/AppStoreVersion/AppStoreVersion.swift +++ b/AppStoreVersion/AppStoreVersion.swift @@ -7,6 +7,7 @@ // import Foundation +import os open class AppStoreVersion { @@ -153,6 +154,9 @@ open class AppStoreVersion { return } + self.cache = result + self.latestVersionAvailable = appStoreVersion + if currentVersion >= appStoreVersion { completion(true, nil) } else { diff --git a/AppStoreVersion/en.lproj/Localizable.strings b/AppStoreVersion/en.lproj/Localizable.strings index da18911..99baa41 100644 --- a/AppStoreVersion/en.lproj/Localizable.strings +++ b/AppStoreVersion/en.lproj/Localizable.strings @@ -7,6 +7,6 @@ */ "AppStoreVersion.NewVersionTitle" = "New Version Available!"; -"AppStoreVersion.NewVersionMessage" = "The version %@ is available on the AppStore."; +"AppStoreVersion.NewVersionMessage" = "The version %@ is available on the App Store."; "AppStoreVersion.Download" = "Download"; "AppStoreVersion.Later" = "Later"; diff --git a/AppStoreVersion/fr.lproj/Localizable.strings b/AppStoreVersion/fr.lproj/Localizable.strings index 3479175..295106f 100644 --- a/AppStoreVersion/fr.lproj/Localizable.strings +++ b/AppStoreVersion/fr.lproj/Localizable.strings @@ -7,6 +7,6 @@ */ "AppStoreVersion.NewVersionTitle" = "Nouvelle version disponible !"; -"AppStoreVersion.NewVersionMessage" = "La version %@ est disponible sur l'AppStore."; +"AppStoreVersion.NewVersionMessage" = "La version %@ est disponible sur l'App Store."; "AppStoreVersion.Download" = "Télécharger"; "AppStoreVersion.Later" = "Plus tard";