Uncaught (in promise): TypeError: Object(...) is not a function TypeError: Object(...) is not a function at CodePush.sync (vendor.js:84065) at MyApp.webpackJsonp.406.MyApp.checkCodePush
I get the above error in my code. My code is as follows.
import { CodePush, InstallMode, SyncStatus } from '@ionic-native/code-push/ngx';
constructor(platform: Platform, statusBar: StatusBar, splashScreen: SplashScreen, private codePush: CodePush) {
platform.ready().then(() => {
statusBar.styleDefault();
splashScreen.hide();
platform.ready().then(() => {
statusBar.styleDefault();
splashScreen.hide();
this.codePush.sync();
});
});