Platform (@ ionic / angular) does not detect the platform for ios 13.4 (tested on ipad ios 13.4 emulator)
Hey there. Can you provide some example of how you are trying to detect the platform? what code are you using?
import { Platform } from “@ionic/angular”;
…
constructor(
private platform: Platform
) {
}
public load() {
if(this.platform.is(“ios”) {
…
}
}
i’am use ionic 6.9.2
with versions prior to ios 13.4 it works correctly. only happens with ios 13.4
Mmm, I just tried this with capacitor, and it worked fine for me
Are you using cordova?
yes. cordova and angular
try adding a platform.ready
call before hand
this.plt.ready().then(() => {
console.log(this.plt.is('ios'));
})
Otherwise the device features on cordova wont be 100%
before…
this.platform.ready().then(() => {
this.systemService.load().then(() => {
Hey I am also experiencing this issue on ios 13.6 (ipad).
Heres how I’m checking
This produces the following on ios 13.6 (ipad)
Heres the output running on ios 12.4.7 (ipad)
Also seeing this issue on iOS 13.7 (and just tried 14.0.1 with same result), I wait for device ready then check platforms list:
Console output:
Ionic Native: deviceready event fired after 748 ms
["tablet","cordova","mobile","hybrid"]
Output of ionic info:
Ionic:
Ionic CLI : 6.11.11
Ionic Framework : @ionic/angular 4.9.0
@angular-devkit/build-angular : 0.801.3
@angular-devkit/schematics : 8.1.3
@angular/cli : 8.1.3
@ionic/angular-toolkit : 2.0.0
Cordova:
Cordova CLI : 10.0.0
Cordova Platforms : android 9.0.0, ios 6.1.1
Cordova Plugins : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 4.2.1, (and 12 other plugins)
Utility:
cordova-res (update available: 0.15.1) : 0.8.1
native-run (update available: 1.2.1) : 0.3.0
System:
ios-deploy : 1.10.0
ios-sim : 8.0.2
NodeJS : v10.16.0
npm : 6.9.0
OS : macOS Catalina
Xcode : Xcode 12.0.1 Build version 12A7300
Same here, thanks for your posts, my workaorund:
if(!this.platform.is('android) && this.platform.is('core'){