@capgo/capacitor-updater 5.5.1 → 5.6.0
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 extends Plugin {
|
|
|
55
55
|
private static final String channelUrlDefault =
|
|
56
56
|
"https://api.capgo.app/channel_self";
|
|
57
57
|
|
|
58
|
-
private final String PLUGIN_VERSION = "5.
|
|
58
|
+
private final String PLUGIN_VERSION = "5.6.0";
|
|
59
59
|
private static final String DELAY_CONDITION_PREFERENCES = "";
|
|
60
60
|
|
|
61
61
|
private SharedPreferences.Editor editor;
|
|
@@ -89,6 +89,7 @@ struct AppVersionDec: Decodable {
|
|
|
89
89
|
let error: String?
|
|
90
90
|
let session_key: String?
|
|
91
91
|
let major: Bool?
|
|
92
|
+
let data: [String: String]?
|
|
92
93
|
}
|
|
93
94
|
public class AppVersion: NSObject {
|
|
94
95
|
var version: String = ""
|
|
@@ -98,6 +99,7 @@ public class AppVersion: NSObject {
|
|
|
98
99
|
var error: String?
|
|
99
100
|
var sessionKey: String?
|
|
100
101
|
var major: Bool?
|
|
102
|
+
var data: [String: String]?
|
|
101
103
|
}
|
|
102
104
|
|
|
103
105
|
extension AppVersion {
|
|
@@ -467,6 +469,9 @@ extension CustomError: LocalizedError {
|
|
|
467
469
|
if let sessionKey = response.value?.session_key {
|
|
468
470
|
latest.sessionKey = sessionKey
|
|
469
471
|
}
|
|
472
|
+
if let data = response.value?.data {
|
|
473
|
+
latest.data = data
|
|
474
|
+
}
|
|
470
475
|
case let .failure(error):
|
|
471
476
|
print("\(self.TAG) Error getting Latest", response.value ?? "", error )
|
|
472
477
|
latest.message = "Error getting Latest \(String(describing: response.value))"
|
|
@@ -15,7 +15,7 @@ import Version
|
|
|
15
15
|
@objc(CapacitorUpdaterPlugin)
|
|
16
16
|
public class CapacitorUpdaterPlugin: CAPPlugin {
|
|
17
17
|
public var implementation = CapacitorUpdater()
|
|
18
|
-
private let PLUGIN_VERSION: String = "5.
|
|
18
|
+
private let PLUGIN_VERSION: String = "5.6.0"
|
|
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"
|