@capgo/capacitor-updater 4.1.1 → 4.2.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/README.md +13 -13
- package/android/src/main/java/ee/forgr/capacitor_updater/CapacitorUpdater.java +1 -1
- package/android/src/main/java/ee/forgr/capacitor_updater/CapacitorUpdaterPlugin.java +1 -1
- package/dist/docs.json +1 -1
- package/dist/esm/definitions.d.ts +1 -1
- package/ios/Plugin/CapacitorUpdater.swift +1 -1
- package/ios/Plugin/CapacitorUpdaterPlugin.swift +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -28,19 +28,6 @@ Create account in [capgo.app](https://capgo.app) and get your [API key](https://
|
|
|
28
28
|
- Add app with CLI `npx @capgo/cli@latest add`
|
|
29
29
|
- Upload app to channel production `npx @capgo/cli@latest upload -c production`
|
|
30
30
|
- Set channel production public `npx @capgo/cli@latest set -c production -s public`
|
|
31
|
-
- Edit your `capacitor.config.json` like below, set `autoUpdate` to true.
|
|
32
|
-
```json
|
|
33
|
-
// capacitor.config.json
|
|
34
|
-
{
|
|
35
|
-
"appId": "**.***.**",
|
|
36
|
-
"appName": "Name",
|
|
37
|
-
"plugins": {
|
|
38
|
-
"CapacitorUpdater": {
|
|
39
|
-
"autoUpdate": true,
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
```
|
|
44
31
|
- Add to your main code
|
|
45
32
|
```javascript
|
|
46
33
|
import { CapacitorUpdater } from '@capgo/capacitor-updater'
|
|
@@ -60,6 +47,19 @@ https://github.com/Cap-go/capacitor-updater/wiki) documentation.
|
|
|
60
47
|
|
|
61
48
|
Download update distribution zipfiles from a custom url. Manually control the entire update process.
|
|
62
49
|
|
|
50
|
+
- Edit your `capacitor.config.json` like below, set `autoUpdate` to true.
|
|
51
|
+
```json
|
|
52
|
+
// capacitor.config.json
|
|
53
|
+
{
|
|
54
|
+
"appId": "**.***.**",
|
|
55
|
+
"appName": "Name",
|
|
56
|
+
"plugins": {
|
|
57
|
+
"CapacitorUpdater": {
|
|
58
|
+
"autoUpdate": false,
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
```
|
|
63
63
|
- Add to your main code
|
|
64
64
|
```javascript
|
|
65
65
|
import { CapacitorUpdater } from '@capgo/capacitor-updater'
|
|
@@ -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.
|
|
50
|
+
public static final String pluginVersion = "4.2.0";
|
|
51
51
|
|
|
52
52
|
public SharedPreferences.Editor editor;
|
|
53
53
|
public SharedPreferences prefs;
|
|
@@ -97,7 +97,7 @@ public class CapacitorUpdaterPlugin extends Plugin implements Application.Activi
|
|
|
97
97
|
this.autoDeleteFailed = this.getConfig().getBoolean("autoDeleteFailed", true);
|
|
98
98
|
this.autoDeletePrevious = this.getConfig().getBoolean("autoDeletePrevious", true);
|
|
99
99
|
this.updateUrl = this.getConfig().getString("updateUrl", updateUrlDefault);
|
|
100
|
-
this.autoUpdate = this.getConfig().getBoolean("autoUpdate",
|
|
100
|
+
this.autoUpdate = this.getConfig().getBoolean("autoUpdate", true);
|
|
101
101
|
this.appReadyTimeout = this.getConfig().getInt("appReadyTimeout", 10000);
|
|
102
102
|
this.resetWhenUpdate = this.getConfig().getBoolean("resetWhenUpdate", true);
|
|
103
103
|
|
package/dist/docs.json
CHANGED
|
@@ -146,7 +146,7 @@ extension CustomError: LocalizedError {
|
|
|
146
146
|
|
|
147
147
|
public let TAG = "✨ Capacitor-updater:";
|
|
148
148
|
public let CAP_SERVER_PATH = "serverBasePath"
|
|
149
|
-
public let pluginVersion = "4.
|
|
149
|
+
public let pluginVersion = "4.2.0"
|
|
150
150
|
public var statsUrl = ""
|
|
151
151
|
public var appId = ""
|
|
152
152
|
public var deviceID = UIDevice.current.identifierForVendor?.uuidString ?? ""
|
|
@@ -33,7 +33,7 @@ public class CapacitorUpdaterPlugin: CAPPlugin {
|
|
|
33
33
|
autoDeleteFailed = getConfig().getBoolean("autoDeleteFailed", true)
|
|
34
34
|
autoDeletePrevious = getConfig().getBoolean("autoDeletePrevious", true)
|
|
35
35
|
updateUrl = getConfig().getString("updateUrl") ?? CapacitorUpdaterPlugin.updateUrlDefault
|
|
36
|
-
autoUpdate = getConfig().getBoolean("autoUpdate",
|
|
36
|
+
autoUpdate = getConfig().getBoolean("autoUpdate", true)
|
|
37
37
|
appReadyTimeout = getConfig().getInt("appReadyTimeout", 10000)
|
|
38
38
|
resetWhenUpdate = getConfig().getBoolean("resetWhenUpdate", true)
|
|
39
39
|
|