Closed ipehimanshu closed 4 years ago
Thanks for the issue. Please see: https://ionicframework.com/docs/angular/platform.
@liamdebeasi below link not help much more https://ionicframework.com/docs/angular/platform
because we need to identify like Code running in app as ipk or app as ipa or run as browser ( it run into desktop or mobile browser).
Got my point ?
see below our ionic 3 code
if (this.platform.is('core') || this.platform.is('mobileweb')) { this.common.device_type = 'browser'; } else { if (this.platform.is('ios')) { this.common.device_type = 'ios'; } else if (this.platform.is('android')) { this.common.device_type = 'android'; } }
Possible to share any demo code which works same like above into ionic 5
Thanks in advance
The Platform dependency injection in Ionic 5 is exactly the same as the Platform dependency injection in Ionic 3 (plus a few bug fixes). The code you have in Ionic 3 should work fine in Ionic 5.
@liamdebeasi But sir this code give error this.platform.is('core')
Can you provide a repo with the code required to reproduce this issue?
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.
Hello sir
i am using latest ionic 5,
we need to detect like code is running for browser (any like android or ios or desktop), or android as apps or ios apps,
Can you please help me to solve this.
Thanks