0

I am trying to use Microsoft Code Push with Ionic native. I have set up as per tutorial.

I installed cordov aplugin + npm ionic native.

My config.xml is

<platform name="android">
<allow-intent href="market:*"/>
<preference name="CodePushDeploymentKey" value="aLu85u3-jcq8Kydtkoo5LmQsFUQMEy2AEB---"/>
</platform>

My app.component.ts is ::

`initializeApp() {
    this.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.
      this.statusBar.styleDefault();
      this.splashScreen.hide();
      if(this.platform.is("mobile")){
        this._codePush.sync().subscribe((syncStatus) => console.log(syncStatus));
      }
    });
  }`

But this give me error on device

Failed to load resource: the server responded with a status of 404 (Not Found)
plugins/cordova-plugin-code-push/bin/www/codePushUtil.js:40 [CodePush] An error occurred while reporting status: {"status":0,"appVersion":"0.0.1","deploymentKey":"aLu85u3-jcq8Kydtkoo5LmQsFUQMEy2AEB---"}
CodePushUtil.logError @ plugins/cordova-plugin-code-push/bin/www/codePushUtil.js:40
plugins/cordova-plugin-code-push/bin/www/codePushUtil.js:36 [CodePush] Checking for update.
codepush.azurewebsites.net/updateCheck?deploymentKey=aLu85u3-jcq8Kydtkoo5Lm…dd06e76f8302c3---&isCompanion=false&label=&clientUniqueId=9f0136c001a89efd Failed to load resource: the server responded with a status of 404 (Not Found)
plugins/cordova-plugin-code-push/bin/www/codePushUtil.js:40 [CodePush]  404: 
CodePushUtil.logError @ plugins/cordova-plugin-code-push/bin/www/codePushUtil.js:40
plugins/cordova-plugin-code-push/bin/www/codePushUtil.js:40
Suraj Rao
  • 29,388
  • 11
  • 94
  • 103
raju
  • 6,448
  • 24
  • 80
  • 163

1 Answers1

0

Removing and adding platform solved this.

raju
  • 6,448
  • 24
  • 80
  • 163