Hi,
I’m using “ionic view” app to test my developing app.
The problem I’m running into is that this.platform.platforms() always gets stuck with iphone. (iOS 11.2.5)
I created a new app with template of sidemenu and edited the home.ts to as below
import { Component } from '@angular/core';
import { NavController, Platform } from 'ionic-angular';
@Component({
selector: 'page-home',
templateUrl: 'home.html'
})
export class HomePage {
// obj: any;
constructor(public navCtrl: NavController, public platform: Platform) {
let obj = this.platform;
setTimeout(function(){alert(obj.platforms());},5000);
}
}
I tested the codes on ionic view with android mobile without problem but iphone would get stuck as long as there are codes with “this.platform”. ex. alert(this.platform.is(‘ios’)) will also get stuck.
My public channel id is d6494198
I wonder if you guys have no problems under this scenario or is there something wrong by me?
Thank you very much.
Thanks for testing. Did you test the app with iphone?
I can execute the app without problem. The alert will pop up.
But with iphone, as long as it runs into “this.platform”, it will become unresponsive.
I guess there is something wrong when this.platform is executed on ios.
However, I can’t make sure if other developers are also running into this problem.
Could you please create a arbitrary app and import Platform as my codes post and then add alert(obj.platforms()); to see if the alert pops up correct.
Many thanks!