@capgo/capacitor-updater 6.1.5 → 6.1.6
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.
|
@@ -56,7 +56,7 @@ public class CapacitorUpdaterPlugin extends Plugin {
|
|
|
56
56
|
private static final String channelUrlDefault =
|
|
57
57
|
"https://api.capgo.app/channel_self";
|
|
58
58
|
|
|
59
|
-
private final String PLUGIN_VERSION = "6.1.
|
|
59
|
+
private final String PLUGIN_VERSION = "6.1.6";
|
|
60
60
|
private static final String DELAY_CONDITION_PREFERENCES = "";
|
|
61
61
|
|
|
62
62
|
private SharedPreferences.Editor editor;
|
|
@@ -258,7 +258,7 @@ extension CustomError: LocalizedError {
|
|
|
258
258
|
public var channelUrl: String = ""
|
|
259
259
|
public var defaultChannel: String = ""
|
|
260
260
|
public var appId: String = ""
|
|
261
|
-
public var deviceID =
|
|
261
|
+
public var deviceID = ""
|
|
262
262
|
public var privateKey: String = ""
|
|
263
263
|
public var signKey: PublicKey?
|
|
264
264
|
|
|
@@ -16,7 +16,7 @@ import SwiftyRSA
|
|
|
16
16
|
@objc(CapacitorUpdaterPlugin)
|
|
17
17
|
public class CapacitorUpdaterPlugin: CAPPlugin {
|
|
18
18
|
public var implementation = CapacitorUpdater()
|
|
19
|
-
private let PLUGIN_VERSION: String = "6.1.
|
|
19
|
+
private let PLUGIN_VERSION: String = "6.1.6"
|
|
20
20
|
static let updateUrlDefault = "https://api.capgo.app/updates"
|
|
21
21
|
static let statsUrlDefault = "https://api.capgo.app/stats"
|
|
22
22
|
static let channelUrlDefault = "https://api.capgo.app/channel_self"
|
|
@@ -45,6 +45,9 @@ public class CapacitorUpdaterPlugin: CAPPlugin {
|
|
|
45
45
|
#endif
|
|
46
46
|
|
|
47
47
|
self.semaphoreUp()
|
|
48
|
+
self.implementation.deviceID = UserDefaults.standard.string(forKey: "appUUID") ?? UUID().uuidString
|
|
49
|
+
UserDefaults.standard.set( self.implementation.deviceID, forKey: "appUUID")
|
|
50
|
+
UserDefaults.standard.synchronize()
|
|
48
51
|
print("\(self.implementation.TAG) init for device \(self.implementation.deviceID)")
|
|
49
52
|
guard let versionName = getConfig().getString("version", Bundle.main.versionName) else {
|
|
50
53
|
print("\(self.implementation.TAG) Cannot get version name")
|