@capgo/capacitor-updater 4.0.0-alpha.36 → 4.0.0-alpha.37
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.
|
@@ -47,7 +47,7 @@ public class CapacitorUpdater {
|
|
|
47
47
|
private static final String bundleDirectory = "versions";
|
|
48
48
|
|
|
49
49
|
public static final String TAG = "Capacitor-updater";
|
|
50
|
-
public static final String pluginVersion = "4.0.0-alpha.
|
|
50
|
+
public static final String pluginVersion = "4.0.0-alpha.37";
|
|
51
51
|
|
|
52
52
|
public SharedPreferences.Editor editor;
|
|
53
53
|
public SharedPreferences prefs;
|
|
@@ -149,7 +149,7 @@ extension CustomError: LocalizedError {
|
|
|
149
149
|
|
|
150
150
|
public let TAG = "✨ Capacitor-updater:";
|
|
151
151
|
public let CAP_SERVER_PATH = "serverBasePath"
|
|
152
|
-
public let pluginVersion = "4.0.0-alpha.
|
|
152
|
+
public let pluginVersion = "4.0.0-alpha.37"
|
|
153
153
|
public var statsUrl = ""
|
|
154
154
|
public var appId = ""
|
|
155
155
|
public var deviceID = UIDevice.current.identifierForVendor?.uuidString ?? ""
|
|
@@ -412,11 +412,11 @@ public class CapacitorUpdaterPlugin: CAPPlugin {
|
|
|
412
412
|
}
|
|
413
413
|
|
|
414
414
|
@objc func appMovedToBackground() {
|
|
415
|
-
print("\(self.implementation.TAG) Check for
|
|
415
|
+
print("\(self.implementation.TAG) Check for pending update")
|
|
416
416
|
let delayUpdate = UserDefaults.standard.string(forKey: DELAY_UPDATE)
|
|
417
417
|
self._checkCancelDelay(killed: false)
|
|
418
418
|
if (delayUpdate != nil) {
|
|
419
|
-
print("\(self.implementation.TAG) Update delayed")
|
|
419
|
+
print("\(self.implementation.TAG) Update delayed to next backgrounding")
|
|
420
420
|
return
|
|
421
421
|
}
|
|
422
422
|
|
|
@@ -426,10 +426,10 @@ public class CapacitorUpdaterPlugin: CAPPlugin {
|
|
|
426
426
|
if (next != nil && !next!.isErrorStatus() && (next!.getVersionName() != current.getVersionName())) {
|
|
427
427
|
print("\(self.implementation.TAG) Next bundle is: \(next!.toString())")
|
|
428
428
|
if (self.implementation.set(bundle: next!) && self._reload()) {
|
|
429
|
-
print("\(self.implementation.TAG) Updated to bundle: \(next
|
|
429
|
+
print("\(self.implementation.TAG) Updated to bundle: \(next!.toString())")
|
|
430
430
|
let _ = self.implementation.setNextBundle(next: Optional<String>.none)
|
|
431
431
|
} else {
|
|
432
|
-
print("\(self.implementation.TAG)
|
|
432
|
+
print("\(self.implementation.TAG) Update to bundle: \(next!.toString()) Failed!")
|
|
433
433
|
}
|
|
434
434
|
}
|
|
435
435
|
}
|