I get this console message
deviceready has not fired after 5 seconds.
Channel not fired: onPluginsReady
Channel not fired: onCordovaReady
when I use the following ionic code snippet.
ionic.Platform.ready(function(){
// will execute when device is ready, or immediately if the device is already ready.
// some code here. I am making calls to sqlite cordova plugin
});
The control never goes inside the ionic.Platform.ready function. Funny thing is that my code works on android devices but don't work on iOS devices.
I have tried doing a lot of stuff so far. I have tried following the troubleshooting given in this link. /
The following is my configuration
Cordova version 5.3.1
Ionic version 1.6.4
I get this console message
deviceready has not fired after 5 seconds.
Channel not fired: onPluginsReady
Channel not fired: onCordovaReady
when I use the following ionic code snippet.
ionic.Platform.ready(function(){
// will execute when device is ready, or immediately if the device is already ready.
// some code here. I am making calls to sqlite cordova plugin
});
The control never goes inside the ionic.Platform.ready function. Funny thing is that my code works on android devices but don't work on iOS devices.
I have tried doing a lot of stuff so far. I have tried following the troubleshooting given in this link. http://ngcordova./docs/mon-issues/
The following is my configuration
Share Improve this question edited Jun 20, 2020 at 9:12 CommunityBot 11 silver badge asked Sep 18, 2015 at 18:52 grane2212grane2212 7741 gold badge10 silver badges30 bronze badgesCordova version 5.3.1
Ionic version 1.6.4
4 Answers
Reset to default 1window.cordova.plugins.Keyboard was causing some issues as it is deprecated as of Cordova version 3.0. Now you need to use window.cordova.require() syntax to access the plugins.
Also removing and adding the ios platform helped.The package.json gets messed up sometimes.
Try adding this if not already included..
http-equiv="Content-Security-Policy"
To meta tag in your index.html file. It should look like..
<meta http-equiv="Content-Security-Policy".......>
I had same issue on iOS .Spent almost 3 to 4 days .Finally any of these two workarounds worked for me
1.add < meta http-equiv="Content-Security-Policy".......> to index.html
2.downgrade platform to 4.0.0 (cordova platform update [email protected]
@grane2212, You did not post any code, so it is difficult to debug this. Please post your index.html file, if this does not answer your question.
You may be loading your javascript support file from a CDN or the web. DO NOT DO THIS.
Load all *.js files locally.
Let me know, if this helps.