Platform cordova return false
See original GitHub issueHello, How I can return webview platform with capacitor? I’m using ionic platform but everytime the verification returns false.
Import:
import {Platform} from '@ionic-angular'
Inject in constructor…
checking:
if(this.platform.is('cordova'){
console.log('is webview');
} else {
console.log('isn't webview');
}
Everytime i’m receiving isn’t webview in device
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Platform.is("cordova") return false on some iOS 11 devices
Inside platform.ready() callback I check whether this is a mobile device with cordova or if it is a local ionic serve runtime.
Read more >this.platform.is('ios') return false for iPad after update ... - GitHub
It is working fine on iPhone but when I run the app on Ipad it always returns false. This issue happened when i...
Read more >ionic Cordova appAvailability always return false
I saw it in another answer somewhere, but it was something about making sure the plist was updated. Here was the original answer, ......
Read more >cordova-plugin-device
model returns the name of the device's model or product. The value is set by the device manufacturer and may be different across...
Read more >The 9 Most Common Mistakes That Ionic Developers Make
Common Mistake #6: Trying to Run Cordova Plugins Inside the Browser. The majority of developers using Ionic will want their app to run...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
You can use device plugin https://capacitor.ionicframework.com/docs/apis/device. Check that the platform value is ios or android, when using the web implementation it has “pwa” value even when tested on mobile devices.
For this.platform.is(‘cordova’) not being true, that’s an Ionic bug. In Ionic 3 I’ve tested and returns 3, on Ionic 4 I think it has been fixed recently, but maybe it’s not released yet.
That’s works! Thank You! Um abraço do Brasil! 💚 💛