@capgo/capacitor-updater 8.0.0 → 10.0.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.
package/android/build.gradle
CHANGED
|
@@ -55,7 +55,7 @@ public class CapacitorUpdaterPlugin
|
|
|
55
55
|
private static final String channelUrlDefault =
|
|
56
56
|
"https://api.capgo.app/channel_self";
|
|
57
57
|
|
|
58
|
-
private final String PLUGIN_VERSION = "
|
|
58
|
+
private final String PLUGIN_VERSION = "10.0.0";
|
|
59
59
|
private static final String DELAY_CONDITION_PREFERENCES = "";
|
|
60
60
|
|
|
61
61
|
private SharedPreferences.Editor editor;
|
|
@@ -537,6 +537,9 @@ public class CapacitorUpdaterPlugin
|
|
|
537
537
|
if (res.has("error")) {
|
|
538
538
|
call.reject(res.getString("error"));
|
|
539
539
|
return;
|
|
540
|
+
} else if (res.has("message")) {
|
|
541
|
+
call.reject(res.getString("message"));
|
|
542
|
+
return;
|
|
540
543
|
} else {
|
|
541
544
|
call.resolve(res);
|
|
542
545
|
}
|
|
@@ -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 = "
|
|
18
|
+
private let PLUGIN_VERSION: String = "10.0.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"
|
|
@@ -235,6 +235,8 @@ public class CapacitorUpdaterPlugin: CAPPlugin {
|
|
|
235
235
|
let res = self.implementation.getLatest(url: URL(string: self.updateUrl)!)
|
|
236
236
|
if res.error != nil {
|
|
237
237
|
call.reject( res.error!)
|
|
238
|
+
} else if res.message != nil {
|
|
239
|
+
call.reject( res.message!)
|
|
238
240
|
} else {
|
|
239
241
|
call.resolve(res.toDict())
|
|
240
242
|
}
|