cordova-adhoc-update
v0.1.7
Published
Easy update your cordova app
Downloads
10
Maintainers
Readme
Documentation
DANGER
This is an experiment! Do not use in production
Compatible with:
- iOS
- Android (working on it, PR welcome)
Introduction
Few lines and some examples to show you how
cordova-adhoc-update
works.
First of all, forget this is something you can use
for public app (published in stores), you want to
use this only for adhoc / enterprise app.
Usually what you do to makes you users update an app,
is to publish a new .ipa
(iOS) or .apk
(Android)
somewhere on internet and send an email to them with
the link (ok, you have to prepare a landing page
with a link pointing to itms-something and a properly
written .plist
).
What cordova-adhoc-update does is to automate this process for you.
Installation
npm i cordova-adhoc-update --save
CLI Usage
cordova-adhoc-update
comes with a beautiful cli interface that let you
do these boring operation a breeze.
Let's assume you have an .ipa
ready for production, you only need
to make cordova-adhoc-update do its job:
cordova-adhoc-update
This command will do a lot of things starting from your cordova config.xml
and
your npm package.json
files.
Create a directory called
appupdate
(you can change it using -o flag)Create an iOS
app.plist
file based on your current cordova configuration The .plist needs a package name, a version , the bundle id, and url used to publish our.ipa
package (taken from thehomepage
field of yourpackage.json
file or specified with the -u flag) and optionally a descriptionCreate an nice
index.html
pointing to the previous createdapp.plist
with theitms-service://
stuff...Copy the icon specified in your
config.xml
cd appupdate
python3 -m http-server
# or if you are a node.js guy
http-server -p 8000
- Create a
manifest.json
with all the info needed by the client to know if this is a new release or the current one
JS Usage
import appupdate from 'cordova-adhoc-update'
appupdate.check('http://url.where.appupdate.json.is', current_app_release )
.then( (rel) => {
console.log('Hey man, we have a new release here')
console.log('is the %s', rel.release)
console.log('with this changelog: %s', rel.changelog)
// if you wanna update
appupdate.update(true)
})