Skip to content
This repository has been archived by the owner on Oct 1, 2018. It is now read-only.

Native plugins are getting deleted from cordova_plugin.js after fetching and installing the update using cordova-hot-code-push-plugin. #367

Closed
ratnakar24 opened this issue Aug 20, 2018 · 1 comment

Comments

@ratnakar24
Copy link

Hi, I'm developing an ionic application and i'm using cordova-hot-code-push plugin for updates. I'm able to successfully fetch the update and install the update. After the update is installed I could notice the native plugins were deleted from the cordova_plugin.js and i was unable to use native plugins like Camera and FIle etc.

My app.component.ts

private hotCordovaPushOptions:HotCodePushRequestOptions = {
    "config-file":"https://warehousemobile.000webhostapp.com/warehouse/chcp.json",
  };
  constructor(platform: Platform, statusBar: StatusBar, splashScreen: SplashScreen,private hotCodePush:HotCodePush) {
    platform.ready().then(() => {
      // Okay, so the platform is ready and our plugins are available.
      // Here you can do any higher level native things you might need.
      statusBar.styleDefault();
      splashScreen.hide();
      this.hotCodePush.fetchUpdate(this.hotCordovaPushOptions).
      then(
          (value:any)=>{
                      this.hotCodePush.isUpdateAvailableForInstallation().
                      then((value:HotCodePushUpdate)=>{
                            this.hotCodePush.installUpdate().then((res:any)=>{
                              console.log(res);
                              }
                            )
                      })
          
          },(error:any)=>
          {
            console.log("e =>"+error)
          });
    });

cordova-hcp.json


{
  "name": "hot-code-push",
  "ios_identifier": "",
  "android_identifier": "",
  "update": "start",
  "content_url": "https://warehousemobile.000webhostapp.com/warehouse"
}

Before fetching the update

module.exports.metadata = 
  // TOP OF METADATA
  {
     "cordova-plugin-camera": "4.0.3",
     "cordova-plugin-whitelist": "1.3.3",
     "cordova-plugin-device": "2.0.2",
     "cordova-plugin-splashscreen": "5.0.2",
     "cordova-plugin-ionic-webview": "2.0.3",
     "cordova-plugin-ionic-keyboard": "2.1.2",
     "cordova-hot-code-push-plugin": "1.5.3"
   };

After the update is installed

module.exports.metadata = 
   // TOP OF METADATA
    {
        "cordova-plugin-whitelist": "1.3.3",
        "cordova-plugin-splashscreen": "5.0.2",
        "cordova-plugin-ionic-webview": "2.0.3",
        "cordova-plugin-ionic-keyboard": "2.1.2",
        "cordova-hot-code-push-plugin": "1.5.3"
   };

I'm not sure whether this is a bug or i'm doing something wrong. Please help me out here

@nordnet-deprecation-bot
Copy link
Contributor

👋 Hi! Thank you for your interest in this repo.

😢 We are not using nordnet/cordova-hot-code-push anymore, and we lack the manpower and the experience needed to maintain it. We are aware of the inconveniece that this may cause you. Feel free to use it as is, or create your own fork.

🔒 This will now be closed & locked.

ℹ️ Please see #371 for more information.

@nordnet nordnet locked and limited conversation to collaborators Sep 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants