Recently I started using Ionic, and I am nearly finished. I’m stuck on the Deploy feature, as I have my app approved via the iOS App Store for Testflight. After I packaged my app, and deployed it, I uploaded an update. It was adding text to a page, something small but to test the deploy feature. And my app doesn’t load with the update. My code below is from app.component.ts, and I believe I am using the Deploy dashboard properly. Thoughts?
import { Component, ViewChild } from '@angular/core';
import { Nav } from 'ionic-angular';
import { StatusBar, Splashscreen } from 'ionic-native';
import {Deploy} from '@ionic/cloud-angular';
import { Page1 } from '../pages/page1/page1';
import { Page2 } from '../pages/page2/page2';
import { Page3 } from '../pages/page3/page3';
import { Page4 } from '../pages/page4/page4';
@Component({
templateUrl: 'app.html'
})
export class MyApp {
@ViewChild(Nav) nav: Nav;
rootPage: any = Page1;
pages: Array<{title: string, component: any}>;
constructor(public deploy: Deploy) {
this.initializeApp();
this.deploy.channel = 'production';
this.deploy.check().then((snapshotAvailable: boolean) => {
if (snapshotAvailable) {
// When snapshotAvailable is true, you can apply the snapshot
this.deploy.download().then(() => {
return this.deploy.extract();
});
this.deploy.load();
}
});
this.pages = [
{ title: 'Dashboard', component: Page1 },
{ title: 'Contributors', component: Page2 },
{ title: 'App Sessions', component: Page3 },
{ title: 'Schedule', component: Page4 }
];
}
initializeApp() {
Splashscreen.show();
StatusBar.styleDefault();
Splashscreen.hide();
}
openPage(page) {
// Reset the content nav to have just this page
// we wouldn't want the back button to show in this scenario
this.nav.setRoot(page.component);
}
}