Ionic 2 Deploy how to?


#1

Hi guys.

Did somebody implemented Deploy in Ionic 2 ?


#2

Finally i implemented update using npm ionic-plugin-update

    IonicDeploy.init(this.app_id, 'https://api.ionic.io');

    IonicDeploy.check(this.app_id, 'dev', function(result) {
        if (result && result === "true") {
            console.log('an update is available');

            IonicDeploy.download(this.app_id, function(result) {
                if (result !== 'true' && result !== 'false') {
                    console.log('progress')
                } else {
                    if (result === 'true') {
                        console.log('Download completed');
                        // Load the updated version


                        IonicDeploy.extract(this.app_id, function(result) {
                            if (result !== 'done') {
                                console.log('extracting progress')
                            } else {
                                console.log(result);
                                if (result === 'true') {
                                    console.info("extraction complete");
                                }
                                IonicDeploy.redirect(this.app_id);
                            }
                        }, function(error) {
                            console.error(error);
                        });
                    }
                }
            }, function(error) {
                console.error(error);
            });



        } else {
            console.log('no updates available');
        }
    }, function(error) {
        console.log(error)
    });

and after redirect my app is updated but all plugins was broken and after restart app loaded old version