Skip to content

PhoneGap plugin for updateing application www contents from URL

Notifications You must be signed in to change notification settings

mpycio/phonegap3-app-update

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

phonegap3-app-update

PhoneGap plugin for updating application www contents from URL. PhoneGap puts www folder inside the app bundle which can’t be written to. For this app to work I had to override one of the core PhoneGap methods to change path to Documents folder.

Usage: phonegap plugin add https://github.com/mpycio/phonegap3-app-update.git

phonnegap create hello com.example.hello HelloWorld
cd hello
phonegap plugin add https://github.com/mpycio/phonegap3-app-update.git
phonegap build ios

Create a zip archive from within your www folder, put it somewhere on the web and change last parameter below to use your archive URL:

        <button id="appUpdateBtn" style="padding: 10px 50px;margin: 20px 0">Update app</button>
        <p id="result"></p>
        <script>
        document.getElementById("appUpdateBtn").addEventListener("click", function(){
            AppUpdate.update(
                function(msg){
                    document.getElementById("result").innerHTML = msg;
                },
                function(errMsg){
                    document.getElementById("result").innerHTML = msg;
                },
                "http://emaho.co.uk/AppUpdate-test.zip"
            );
        }, false);
        </script>

About

PhoneGap plugin for updateing application www contents from URL

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published