|
1 |
| -Ionic Cordova SDK |
| 1 | +Ionic Live Update SDK |
2 | 2 | ======
|
3 | 3 |
|
4 |
| -Supported platforms: iOS, Android |
| 4 | +## Documentation |
5 | 5 |
|
6 |
| -## Setup |
| 6 | +Documentation can be found [here](https://ionicframework.com/docs/appflow/deploy/intro) |
7 | 7 |
|
8 |
| -```bash |
9 |
| -cordova plugin add cordova-plugin-ionic --save --variable APP_ID="abcd1234" --variable CHANNEL_NAME="Master" --variable UPDATE_METHOD="background" |
10 |
| -``` |
| 8 | +## Support |
11 | 9 |
|
12 |
| -The plugin will be available on `window` as `IonicCordova` |
13 |
| - |
14 |
| -**NOTE**: The plugin delays the cordova ready event until it finish checking for updates and add this preference to the app `<preference name="AutoHideSplashScreen" value="false"/>`, which makes the Splash Screen to not go away automatically. All Ionic templates run `this.splashScreen.hide();` on cordova ready event, but if it was removed it should be added back. Alternatively the app can add `<preference name="AutoHideSplashScreen" value="true"/>` to override the value added by the plugin, but that can lead to the Splash Screen going away before the download is complete. |
15 |
| - |
16 |
| -## Live Updates |
17 |
| - |
18 |
| -### Cordova Install Variables |
19 |
| - |
20 |
| -* `APP_ID` **Required** - Your Ionic Pro app ID |
21 |
| -* `CHANNEL_NAME` **Required** - The channel to check for updates from |
22 |
| -* `UPDATE_API` - The location of the Ionic Pro API (only change this for development) |
23 |
| -* `UPDATE_METHOD` - `auto`, `background`, or `none`. Dictates the behavior of the plugin. `auto` will download and apply the latest update on app start, potentially leading to long splash screen loads if the connection is slow. `background` will only download the update in the background on app start, but will allow full functionality while doing so, only redirecting users the _next_ time the app is loaded. `none` will do nothing, leaving full plugin functionality in the hands of the developer. **Default is `background`** |
24 |
| -* `MAX_STORE` - The maximum number of downloaded versions to store on the device for quick loading. More versions means less downloading, but can increase the app size greatly. **Default is 3 (Defaults is 2 in V5)** |
25 |
| -* `MIN_BACKGROUND_DURATION` - The minimum duration in seconds after which the app in background checks for an update. **Default is 30 (New in V5)** |
26 |
| - |
27 |
| -### Preferences |
28 |
| - |
29 |
| -* `DisableDeploy` - Default value is `false`. |
30 |
| - |
31 |
| -Allows to disable deploy updates by adding this preference in the config.xml |
32 |
| - |
33 |
| -``` |
34 |
| -<preference name="DisableDeploy" value="true" /> |
35 |
| -``` |
36 |
| - |
37 |
| -## API Docs |
38 |
| - |
39 |
| -* [IonicCordova](docs/interfaces/ipluginbaseapi.md) |
40 |
| -* [IonicCordova.deploy](docs/interfaces/ideploypluginapi.md) |
41 |
| - |
42 |
| -### External modules |
43 |
| - |
44 |
| - |
45 |
| ---- |
46 |
| - |
47 |
| - |
48 |
| -## Contributing to this plugin |
49 |
| - |
50 |
| -```bash |
51 |
| -npm install |
52 |
| -npm run create-dev |
53 |
| -``` |
54 |
| - |
55 |
| -This will create a blank Ionic app in a local `tmp` directory with the plugin and dependencies installed, and the iOS platform added. Native plugin code is installed with `--link` and any changes to the typescript in `www` will be copied over into the app's `platforms/ios` and `platforms/android` directories. |
56 |
| - |
57 |
| -### Some other helpful dev commands |
58 |
| - |
59 |
| -```bash |
60 |
| -npm run apply-dev |
61 |
| -``` |
62 |
| - |
63 |
| -Updates the linked plugin in the `tmp` test app with your JavaScript changes |
64 |
| - |
65 |
| -```bash |
66 |
| -npm run watch |
67 |
| -``` |
68 |
| - |
69 |
| -Watches for Typescript changes |
70 |
| - |
71 |
| -```bash |
72 |
| -npm run watch-dev |
73 |
| -``` |
74 |
| - |
75 |
| -Watches for Typescript changes, then runs the `apply-dev` script to propogate them to the testing app. |
| 10 | +If you need support please use our [customer support portal](https://ionic.zendesk.com/hc/en-us). |
0 commit comments