New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

cordova-plugin-liveupdate

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cordova-plugin-liveupdate

Ionic Cordova Live Update SDK

  • 4.1.6
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3
Maintainers
1
Weekly downloads
 
Created
Source

cordova-plugin-liveupdate

A fork of cordova-plugin-ionic(original repo: https://github.com/ionic-team/cordova-plugin-ionic).

(※ cordova-plugin-ionic has been built for a legacy function of ionic cloud in the past, and it is being used for a new features of Ionic Pro with auto-testing/deployment, etc )

Now we use it in the UpdateManager of FieldFLEX 11, and it uses minimum features of the plugin: 3 methods (initialize, download, install and restart).

Supported platforms: iOS, Android

Installation

cordova plugin add cordova-plugin-liveupdate

The plugin will be available on window as IonicCordova

How To Use

Before you proceed

A new updates should be exist in the HOST_URL(ex: https://sever-url/updates.ffx), it should be named to www.zip, so that you should be available to download www.zip file when you link HOST_URL.

How to generate www.zip? Compress www directory (build files) from the latest codebase, can use any Zip tools.

Cordova API

APIDESCRIPTION
IonicCordova.deploy.init(config, success, failure)Required - Initializes the plugin with an app ID and API host specified in js-land. Can be used to change these variables at runtime.
IonicCordova.deploy.check(success, failure)- Check for updates from a specified channel, will change the saved channel from the install step.
IonicCordova.deploy.download(success, failure)- If an update is present, download it.
IonicCordova.deploy.extract(success, failure)- If an update has been downloaded, extract it and set the default redirect location for next app start.
IonicCordova.deploy.redirect(success, failure)- Redirect to the latest version of the app on this device.
IonicCordova.deploy.info(success, failure)Archived - (ignore it for now.) Get info on current version for this device.
IonicCordova.deploy.getVersions(success, failure)Archived (ignore it for now.) - List downloaded versions on this device.
IonicCordova.deploy.deleteVersion(uuid, success, failure)Archived (ignore it for now.) - Delete a downloaded version by UUID from this device.

Sample

  • initialize():
 const deployConf = {
   appId: 'fieldflex-eleven',
   host: `${FieldFLEX.serverUrl}/updates.ffx`
 };
 
 const deploy = window.IonicCordova.deploy;
 if (deploy) {
   deploy.init(deployConf, callback, error);
 }
 ...

  • download():
 const deploy = window.IonicCordova.deploy;
 if (deploy) {
   deploy.download(callback, error);
 }
 ...

  • extract():
 const deploy = window.IonicCordova.deploy;
 if (deploy) {
   deploy.extract(callback, error);
 }
 ...
 
  • redirect():
 const deploy = window.IonicCordova.deploy;
 if (deploy) {
   deploy.redirect(callback, error);
 }
 ...
 

Keywords

FAQs

Package last updated on 08 Nov 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc