代码推送发布良好,但未到达应用程序

时间:2019-05-17 21:14:57

标签: angular cordova ionic-framework ionic4 code-push

我正在使用ionic 4框架,并且我在android应用程序上工作,并且一切正常,之后我尝试使用code-push-plugin发布对我的应用程序的更新,我设置了code-push-cli并登录到appcenter并安装了插件并将其导入到app.module中,一切正常,因此我使用“ ionic cordova build android”构建了一个调试版本,并在我的应用中进行了一些更改(以检查插件),并使用“ code-push release-cordova MyApp android”以发布更新。它可以很好地上传,但从未显示在我的应用程序中

我检查应用程序中心并转到暂存版本,我发现我的版本更新

这是我的app.componant.ts文件

array(['0', '1', '2', '3', '4', '5', '6', '7', '0', '1' ... '6', ''7])

这是我的config.xml

import { CodePush } from '@ionic-native/code-push/ngx';


@Component({
  selector: 'app-root',
  templateUrl: 'app.component.html'
})
export class AppComponent {
  constructor(
   .
   .
   .
    private codePush: CodePush,
   .
  ) {

    this.initializeApp();
  }


  initializeApp() {
    this.platform.ready().then(() => {

      this.codePush.sync().subscribe((syncStatus) => console.log(syncStatus));

      const downloadProgress = (progress) => { console.log(`Downloaded 
      ${progress.receivedBytes} of ${progress.totalBytes}`); }
      this.codePush.sync({}, downloadProgress).subscribe((syncStatus) => 
      console.log(syncStatus));

   this.statusBar.styleDefault();
   this.splashScreen.hide();
});
}

1 个答案:

答案 0 :(得分:0)

检查您的日志。应该有[CodePush]标签,并且您应该看到一些有关检查更新的消息。 如果看到这些消息,请检查目标二进制版本。它应该等于您的应用程序版本。 如果没有看到这些消息,则表示CodePush设置或配置中存在一些问题。