@capgo/capacitor-updater 5.2.16 → 5.2.18
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.
|
@@ -57,7 +57,7 @@ public class CapacitorUpdaterPlugin
|
|
|
57
57
|
private static final String channelUrlDefault =
|
|
58
58
|
"https://api.capgo.app/channel_self";
|
|
59
59
|
|
|
60
|
-
private final String PLUGIN_VERSION = "5.2.
|
|
60
|
+
private final String PLUGIN_VERSION = "5.2.18";
|
|
61
61
|
private static final String DELAY_CONDITION_PREFERENCES = "";
|
|
62
62
|
|
|
63
63
|
private SharedPreferences.Editor editor;
|
|
@@ -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 = "5.2.
|
|
18
|
+
private let PLUGIN_VERSION: String = "5.2.18"
|
|
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"
|
|
@@ -530,11 +530,11 @@ public class CapacitorUpdaterPlugin: CAPPlugin {
|
|
|
530
530
|
let current = self.implementation.getCurrentBundle()
|
|
531
531
|
|
|
532
532
|
if (res.message) != nil {
|
|
533
|
-
print("\(self.implementation.TAG) API
|
|
533
|
+
print("\(self.implementation.TAG) API response: \(res.message ?? "")")
|
|
534
534
|
if res.major == true {
|
|
535
535
|
self.notifyListeners("majorAvailable", data: ["version": res.version])
|
|
536
536
|
}
|
|
537
|
-
self.endBackGroundTaskWithNotif(msg: res.message ?? "", latestVersionName: res.version, current: current)
|
|
537
|
+
self.endBackGroundTaskWithNotif(msg: res.message ?? "", latestVersionName: res.version, current: current, error: false)
|
|
538
538
|
return
|
|
539
539
|
}
|
|
540
540
|
let sessionKey = res.sessionKey ?? ""
|
|
@@ -585,11 +585,11 @@ public class CapacitorUpdaterPlugin: CAPPlugin {
|
|
|
585
585
|
_ = self.implementation.set(bundle: next)
|
|
586
586
|
_ = self._reload()
|
|
587
587
|
self.directUpdate = false
|
|
588
|
-
self.endBackGroundTaskWithNotif(msg: "update installed", latestVersionName: latestVersionName, current: current)
|
|
588
|
+
self.endBackGroundTaskWithNotif(msg: "update installed", latestVersionName: latestVersionName, current: current, error: false)
|
|
589
589
|
} else {
|
|
590
590
|
self.notifyListeners("updateAvailable", data: ["bundle": next.toJSON()])
|
|
591
591
|
_ = self.implementation.setNextBundle(next: next.getId())
|
|
592
|
-
self.endBackGroundTaskWithNotif(msg: "update downloaded, will install next background", latestVersionName: latestVersionName, current: current)
|
|
592
|
+
self.endBackGroundTaskWithNotif(msg: "update downloaded, will install next background", latestVersionName: latestVersionName, current: current, error: false)
|
|
593
593
|
}
|
|
594
594
|
return
|
|
595
595
|
} catch {
|