我正在尝试将 Microsoft Code Push 与 Ionic 本机一起使用。我已经按照教程设置了。
我安装了cordov aplugin + npm ionic native。
我的 config.xml 是
<platform name="android">
<allow-intent href="market:*"/>
<preference name="CodePushDeploymentKey" value="aLu85u3-jcq8Kydtkoo5LmQsFUQMEy2AEB---"/>
</platform>
我的 app.component.ts 是 ::
`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));
}
});
}`
但这给了我设备上的错误
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