@capgo/capacitor-updater 4.61.5 → 4.61.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -55,7 +55,7 @@ public class CapacitorUpdaterPlugin
|
|
|
55
55
|
private static final String channelUrlDefault =
|
|
56
56
|
"https://api.capgo.app/channel_self";
|
|
57
57
|
|
|
58
|
-
private final String PLUGIN_VERSION = "4.61.
|
|
58
|
+
private final String PLUGIN_VERSION = "4.61.7";
|
|
59
59
|
private static final String DELAY_CONDITION_PREFERENCES = "";
|
|
60
60
|
|
|
61
61
|
private SharedPreferences.Editor editor;
|
|
@@ -106,7 +106,8 @@ public class CapacitorUpdaterPlugin
|
|
|
106
106
|
.getPackageManager()
|
|
107
107
|
.getPackageInfo(this.getContext().getPackageName(), 0);
|
|
108
108
|
this.implementation.activity = this.getActivity();
|
|
109
|
-
this.implementation.versionBuild =
|
|
109
|
+
this.implementation.versionBuild =
|
|
110
|
+
this.getConfig().getString("version", pInfo.versionName);
|
|
110
111
|
this.implementation.PLUGIN_VERSION = this.PLUGIN_VERSION;
|
|
111
112
|
this.implementation.versionCode = Integer.toString(pInfo.versionCode);
|
|
112
113
|
this.implementation.requestQueue =
|
|
@@ -219,7 +219,6 @@ extension CustomError: LocalizedError {
|
|
|
219
219
|
|
|
220
220
|
@objc public class CapacitorUpdater: NSObject {
|
|
221
221
|
|
|
222
|
-
private let versionName: String = Bundle.main.versionName ?? ""
|
|
223
222
|
private let versionCode: String = Bundle.main.versionCode ?? ""
|
|
224
223
|
private let versionOs = UIDevice.current.systemVersion
|
|
225
224
|
private let documentsDir: URL = FileManager.default.urls(for: .documentDirectory, in: .userDomainMask).first!
|
|
@@ -233,6 +232,7 @@ extension CustomError: LocalizedError {
|
|
|
233
232
|
|
|
234
233
|
public let TAG: String = "✨ Capacitor-updater:"
|
|
235
234
|
public let CAP_SERVER_PATH: String = "serverBasePath"
|
|
235
|
+
public var versionName: String = ""
|
|
236
236
|
public var customId: String = ""
|
|
237
237
|
public var PLUGIN_VERSION: String = ""
|
|
238
238
|
public let timeout: Double = 20
|
|
@@ -15,7 +15,7 @@ import Version
|
|
|
15
15
|
@objc(CapacitorUpdaterPlugin)
|
|
16
16
|
public class CapacitorUpdaterPlugin: CAPPlugin {
|
|
17
17
|
private var implementation = CapacitorUpdater()
|
|
18
|
-
private let PLUGIN_VERSION: String = "4.61.
|
|
18
|
+
private let PLUGIN_VERSION: String = "4.61.7"
|
|
19
19
|
static let updateUrlDefault = "https://api.capgo.app/updates"
|
|
20
20
|
static let statsUrlDefault = "https://api.capgo.app/stats"
|
|
21
21
|
static let channelUrlDefault = "https://api.capgo.app/channel_self"
|
|
@@ -41,6 +41,7 @@ public class CapacitorUpdaterPlugin: CAPPlugin {
|
|
|
41
41
|
} catch {
|
|
42
42
|
print("\(self.implementation.TAG) Cannot get version native \(currentVersionNative)")
|
|
43
43
|
}
|
|
44
|
+
implementation.versionName = getConfig().getString("version", Bundle.main.versionName)!
|
|
44
45
|
autoDeleteFailed = getConfig().getBoolean("autoDeleteFailed", true)
|
|
45
46
|
autoDeletePrevious = getConfig().getBoolean("autoDeletePrevious", true)
|
|
46
47
|
updateUrl = getConfig().getString("updateUrl", CapacitorUpdaterPlugin.updateUrlDefault)!
|
package/package.json
CHANGED