$ionicPlatform.ready taking a long time to load

Hey there,

I’m using $ionicPlatform.ready in a service to load Admob. It fires, but it takes about 10+ seconds after the app is opened to fire. Also the header is squashed in with the status bar until the .ready is fired 10+ seconds after the app is opened. How come this function is taking so long to fire?

Well it shouldn’t by itself. ionicPlatform.ready is just a wrapper for Cordova’s deviceready. Do you have any Cordova plugins loaded? Maybe try removing them to see if they are at issue here?

I’ve narrowed down the problem a bit more. It’s not a plugin issue, I deleted all the plugins other then the cordova device one and the issue remained. I’m using a 3rd party JS API library to do some searching with, when this library finishes it’s call, then the $ionicPlatform.ready function fires. I find it strange that some HTTP requests would be preventing the .ready() function to fire.

An easy hack I just did was wrap my entire controller in the $ionicPlatform.ready() callback :smile:

Please post your example code. I have same issue.