@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 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.1.1";
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", false);
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
@@ -1335,7 +1335,7 @@
1335
1335
  "name": "autoUpdate",
1336
1336
  "tags": [
1337
1337
  {
1338
- "text": "false",
1338
+ "text": "true",
1339
1339
  "name": "default"
1340
1340
  },
1341
1341
  {
@@ -37,7 +37,7 @@ declare module '@capacitor/cli' {
37
37
  *
38
38
  * Only available for Android and iOS.
39
39
  *
40
- * @default false
40
+ * @default true
41
41
  * @example false
42
42
  */
43
43
  autoUpdate?: boolean;
@@ -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.1.1"
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", false)
36
+ autoUpdate = getConfig().getBoolean("autoUpdate", true)
37
37
  appReadyTimeout = getConfig().getInt("appReadyTimeout", 10000)
38
38
  resetWhenUpdate = getConfig().getBoolean("resetWhenUpdate", true)
39
39
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capgo/capacitor-updater",
3
- "version": "4.1.1",
3
+ "version": "4.2.0",
4
4
  "license": "LGPL-3.0-only",
5
5
  "description": "OTA update for capacitor apps",
6
6
  "main": "dist/plugin.cjs.js",