@capgo/capacitor-updater 5.6.7 → 5.6.8
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
|
@@ -20,8 +20,8 @@
|
|
|
20
20
|
Update Ionic Capacitor apps without App/Play Store review (Code-push / hot-code updates).
|
|
21
21
|
|
|
22
22
|
You have 3 ways possible :
|
|
23
|
-
- Use [capgo.app](https://capgo.app) a full featured auto
|
|
24
|
-
- Use your own server update with auto
|
|
23
|
+
- Use [capgo.app](https://capgo.app) a full featured auto-update system in 5 min Setup, to manage version, update, revert and see stats.
|
|
24
|
+
- Use your own server update with auto-update system
|
|
25
25
|
- Use manual methods to zip, upload, download, from JS to do it when you want.
|
|
26
26
|
|
|
27
27
|
|
|
@@ -29,7 +29,7 @@ You have 3 ways possible :
|
|
|
29
29
|
Join the [discord](https://discord.gg/VnYRvBfgA6) to get help.
|
|
30
30
|
|
|
31
31
|
## Documentation
|
|
32
|
-
I maintain a more user
|
|
32
|
+
I maintain a more user-friendly and complete [documentation here](https://capgo.app/docs/).
|
|
33
33
|
|
|
34
34
|
## Installation
|
|
35
35
|
|
|
@@ -40,16 +40,16 @@ npx cap sync
|
|
|
40
40
|
|
|
41
41
|
## Auto-update setup
|
|
42
42
|
|
|
43
|
-
Create your account in [capgo.app](https://capgo.app) and get your [API key](https://capgo.app/
|
|
43
|
+
Create your account in [capgo.app](https://capgo.app) and get your [API key](https://web.capgo.app/dashboard/apikeys)
|
|
44
44
|
- Login to CLI `npx @capgo/cli@latest init API_KEY`
|
|
45
45
|
And follow the steps by step to setup your app.
|
|
46
46
|
|
|
47
|
-
|
|
47
|
+
For detailed instructions on the auto-update setup, refer to the [Auto update documentation](https://capgo.app/docs/plugin/cloud-mode/getting-started/).
|
|
48
48
|
|
|
49
49
|
|
|
50
50
|
## Manual setup
|
|
51
51
|
|
|
52
|
-
Download update distribution zipfiles from a custom
|
|
52
|
+
Download update distribution zipfiles from a custom URL. Manually control the entire update process.
|
|
53
53
|
|
|
54
54
|
- Edit your `capacitor.config.json` like below, set `autoUpdate` to false.
|
|
55
55
|
```json
|
|
@@ -69,7 +69,7 @@ Download update distribution zipfiles from a custom url. Manually control the en
|
|
|
69
69
|
import { CapacitorUpdater } from '@capgo/capacitor-updater'
|
|
70
70
|
CapacitorUpdater.notifyAppReady()
|
|
71
71
|
```
|
|
72
|
-
This informs Capacitor
|
|
72
|
+
This informs Capacitor Updater that the current update bundle has loaded succesfully. Failing to call this method will cause your application to be rolled back to the previously successful version (or built-in bundle).
|
|
73
73
|
- Add this to your application.
|
|
74
74
|
```javascript
|
|
75
75
|
const version = await CapacitorUpdater.download({
|
|
@@ -108,7 +108,7 @@ You might also consider performing auto-update when application state changes, a
|
|
|
108
108
|
|
|
109
109
|
```
|
|
110
110
|
|
|
111
|
-
TIP: If you prefer a secure and automated way to update your app, you can use [capgo.app](https://capgo.app) - a full-featured, auto
|
|
111
|
+
TIP: If you prefer a secure and automated way to update your app, you can use [capgo.app](https://capgo.app) - a full-featured, auto-update system.
|
|
112
112
|
|
|
113
113
|
### Store Guideline Compliance
|
|
114
114
|
|
|
@@ -116,28 +116,33 @@ Android Google Play and iOS App Store have corresponding guidelines that have ru
|
|
|
116
116
|
|
|
117
117
|
#### Google play
|
|
118
118
|
|
|
119
|
-
Third paragraph of [Device and Network Abuse](https://support.google.com/googleplay/android-developer/answer/9888379?hl=en) topic describe that updating source code by any method
|
|
120
|
-
> This restriction does not apply to code that runs in a virtual machine and has limited access to Android APIs (such as JavaScript in a
|
|
119
|
+
Third paragraph of [Device and Network Abuse](https://support.google.com/googleplay/android-developer/answer/9888379?hl=en) topic describe that updating source code by any method besides Google Play's update mechanism is restricted. But this restriction does not apply to updating JavaScript bundles.
|
|
120
|
+
> This restriction does not apply to code that runs in a virtual machine and has limited access to Android APIs (such as JavaScript in a web view or browser).
|
|
121
121
|
|
|
122
122
|
That fully allow Capacitor-updater as it updates just JS bundles and can't update native code part.
|
|
123
123
|
|
|
124
124
|
#### App Store
|
|
125
125
|
|
|
126
|
-
Paragraph **3.3.2**, since back in 2015's [Apple Developer Program License Agreement](https://developer.apple.com/programs/ios/information/) fully allowed performing over-the-air updates of JavaScript and assets
|
|
126
|
+
Paragraph **3.3.2**, since back in 2015's [Apple Developer Program License Agreement](https://developer.apple.com/programs/ios/information/) fully allowed performing over-the-air updates of JavaScript and assets.
|
|
127
127
|
|
|
128
|
-
|
|
128
|
+
And in its latest version (20170605) [downloadable here](https://developer.apple.com/terms/) this ruling is even broader:
|
|
129
129
|
|
|
130
|
-
|
|
130
|
+
> Interpreted code may be downloaded to an Application, but only so long as such code:
|
|
131
|
+
- (a) does not change the primary purpose of the Application by providing features or functionality that are inconsistent with the intended and advertised purpose of the Application as submitted to the App Store
|
|
132
|
+
- (b) does not create a store or storefront for other code or applications
|
|
133
|
+
- (c) does not bypass signing, sandbox, or other security features of the OS.
|
|
131
134
|
|
|
132
|
-
|
|
135
|
+
Capacitor-updater allows you to respect these rules in full compliance, so long as the update you push does not significantly deviate your product from its original App Store approved intent.
|
|
133
136
|
|
|
134
|
-
|
|
137
|
+
To further remain in compliance with Apple's guidelines, we suggest that App Store-distributed apps don't enable the `Force update` scenario, since in the [App Store Review Guidelines](https://developer.apple.com/app-store/review/guidelines/) it is written that:
|
|
135
138
|
|
|
136
|
-
|
|
139
|
+
> Apps must not force users to rate the app, review the app, download other apps, or other similar actions to access functionality, content, or use of the app.
|
|
140
|
+
|
|
141
|
+
This is not a problem for the default behavior of background update, since it won't force the user to apply the new version until the next app close, but at least you should be aware of that ruling if you decide to show it.
|
|
137
142
|
|
|
138
143
|
### Packaging `dist.zip` update bundles
|
|
139
144
|
|
|
140
|
-
Capacitor
|
|
145
|
+
Capacitor Updater works by unzipping a compiled app bundle to the native device filesystem. Whatever you choose to name the file you upload/download from your release/update server URL (via either manual or automatic updating), this `.zip` bundle must meet the following requirements:
|
|
141
146
|
|
|
142
147
|
- The zip file should contain the full contents of your production Capacitor build output folder, usually `{project directory}/dist/` or `{project directory}/www/`. This is where `index.html` will be located, and it should also contain all bundled JavaScript, CSS, and web resources necessary for your app to run.
|
|
143
148
|
- Do not password encrypt the bundle zip file, or it will fail to unpack.
|
|
@@ -1051,4 +1056,4 @@ On iOS, Apple don't allow you to show a message when the app is updated, so you
|
|
|
1051
1056
|
|
|
1052
1057
|
### Contributors
|
|
1053
1058
|
|
|
1054
|
-
[jamesyoung1337](https://github.com/jamesyoung1337)
|
|
1059
|
+
[jamesyoung1337](https://github.com/jamesyoung1337) Thank you so much for your guidance and support, it was impossible to make this plugin work without you.
|
|
@@ -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.6.
|
|
58
|
+
private final String PLUGIN_VERSION = "5.6.8";
|
|
59
59
|
private static final String DELAY_CONDITION_PREFERENCES = "";
|
|
60
60
|
|
|
61
61
|
private SharedPreferences.Editor editor;
|
|
@@ -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.6.
|
|
18
|
+
private let PLUGIN_VERSION: String = "5.6.8"
|
|
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"
|