@capgo/capacitor-updater 4.3.0 → 4.3.2
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.
|
@@ -45,7 +45,7 @@ public class CapacitorUpdater {
|
|
|
45
45
|
private static final String bundleDirectory = "versions";
|
|
46
46
|
|
|
47
47
|
public static final String TAG = "Capacitor-updater";
|
|
48
|
-
public static final String pluginVersion = "4.3.
|
|
48
|
+
public static final String pluginVersion = "4.3.2";
|
|
49
49
|
|
|
50
50
|
public SharedPreferences.Editor editor;
|
|
51
51
|
public SharedPreferences prefs;
|
|
@@ -354,7 +354,7 @@ public class CapacitorUpdater {
|
|
|
354
354
|
final String versionCode = this.versionCode;
|
|
355
355
|
final String versionOs = this.versionOs;
|
|
356
356
|
final String pluginVersion = CapacitorUpdater.pluginVersion;
|
|
357
|
-
final String
|
|
357
|
+
final String versionName = this.getCurrentBundle().getVersionName();
|
|
358
358
|
try {
|
|
359
359
|
JSONObject json = new JSONObject();
|
|
360
360
|
json.put("platform", "android");
|
|
@@ -363,7 +363,7 @@ public class CapacitorUpdater {
|
|
|
363
363
|
json.put("version_build", versionBuild);
|
|
364
364
|
json.put("version_code", versionCode);
|
|
365
365
|
json.put("version_os", versionOs);
|
|
366
|
-
json.put("version_name",
|
|
366
|
+
json.put("version_name", versionName);
|
|
367
367
|
json.put("plugin_version", pluginVersion);
|
|
368
368
|
|
|
369
369
|
Log.i(CapacitorUpdater.TAG, "Auto-update parameters: " + json);
|
|
@@ -146,7 +146,7 @@ extension CustomError: LocalizedError {
|
|
|
146
146
|
|
|
147
147
|
public let TAG = "✨ Capacitor-updater:"
|
|
148
148
|
public let CAP_SERVER_PATH = "serverBasePath"
|
|
149
|
-
public let pluginVersion = "4.3.
|
|
149
|
+
public let pluginVersion = "4.3.2"
|
|
150
150
|
public var statsUrl = ""
|
|
151
151
|
public var appId = ""
|
|
152
152
|
public var deviceID = UIDevice.current.identifierForVendor?.uuidString ?? ""
|
|
@@ -107,9 +107,9 @@ public class CapacitorUpdaterPlugin: CAPPlugin {
|
|
|
107
107
|
let res = try implementation.download(url: url!, version: version)
|
|
108
108
|
call.resolve(res.toJSON())
|
|
109
109
|
} catch {
|
|
110
|
-
print("\(self.implementation.TAG) Failed to download from: \(url
|
|
110
|
+
print("\(self.implementation.TAG) Failed to download from: \(url!) \(error.localizedDescription)")
|
|
111
111
|
self.notifyListeners("downloadFailed", data: ["version": version])
|
|
112
|
-
call.reject("Failed to download from: \(url
|
|
112
|
+
call.reject("Failed to download from: \(url!)", error.localizedDescription)
|
|
113
113
|
}
|
|
114
114
|
}
|
|
115
115
|
|