Cordova not available on browser console
srikanth4372 opened this issue · comments
Browser console has few warnings and HTTP operations are not working please advise.
Native: tried calling SplashScreen.hide, but Cordova is not available. Make sure to include cordova.js or run in a device/simulator
Are you seriously think that is should work in web browser? SplashScreen.hide() it's native plugin method and it's shouldn't work in web browser. This is not the reason why you http calls is not working. Looks like you do something wrong inside your http service.
There is nothing wrong in HTTP calls. I have just initiated the package and trying to invoke.
If there is anything wrong in the HTTP call method, an error will be different but the errors I am getting is Cordova not available. Not sure if this is a problem something related to version conflict between packages. Ionic version
cordova will be available on mobile device only. You should build app for iphone or android and then run app on device or simulator and then you will see that error "Cordova not available" will disappear. cordova namespace available only on device, you can't use cordova methods inside your desktop browser.
Is this after update to Ionic 4 from Ionic 3? Just asking I am new to the ionic framework. please advise the better way for quick development - for any change done in the code level need to be reflected in the application.
Browser having both ios and android emulators are very flexible and helpful for development. Can we get it this way in Ionic 4?
no. you can't get it in browser. You must run xcode or android studio emulator to get access cordova methods
Will follow the same and thanks for the advice. Good day!
have a nice day. bye