the case: I'm using iOS Enterprise Program for Ionic 2 app. One of issues for such distribution type was in supporting update flow. To solve this, we created simple JSON on server side to check available update. When update is available, user sees alert with suggestion to update app or exit.
app.component.ts
iosUpdateCheck() {
this.http.get(`${this.config.iosEnterpriseEndpoint}latest.json`).map(res =>
<{version: string}>res.json()).subscribe((res) => {
if (res.version !== this.config.appVersionNumber) {
this.message.alertCtrl.create({
title: 'Update is available!',
message: 'Please, update your terminal to proceed',
buttons: [
{
text: 'Update',
handler: () => {
console.log(this.TAG + 'iosUpdateCheck: update clicked');
//I tried just href also
window.window.open(`<a href=itms-services://?action=download-manifest&url=${this.config.iosEnterpriseEndpoint}manifest.plist />`,'_system');
}
},
{
text: 'Exit',
role: 'cancel',
handler: () => {
console.log(this.TAG + 'iosUpdateCheck: exit clicked');
this.platform.exitApp();
}
},
]
}).present();
}
});
}
I also added in config.xml
<allow-intent href="itms-services:*"/>
but still getting same error(sorry for screenshot, it's impossible to copy error link in Safari):
If I will use just a link it works fine but does not correspond to the objectives pursued.