ionic-team / ionic-v1

The repo for Ionic 1.x. For the latest version of Ionic, please see https://github.com/ionic-team/ionic
Other
193 stars 187 forks source link

Low Network and Platform ready event #261

Closed tgensol closed 7 years ago

tgensol commented 7 years ago

Short description of the problem:

When having a bad or no network, the platforn.ready() takes a serious long time on iOs and Android ( I did not try on browser) To compare, the deviceready event of Cordova will always fire after couple of seconds (with Wifi, or no network). But the platform ready of Ionic will not... and if you are waiting for it to change your rootPage or some others codes (like splashscreen.hide(), set the language of the ngx-translate,..., it can take a really really long time (30-60seconds sometimes.., especially if you have not network at all)

What behavior are you expecting?

On deviceready event, I can see (on my app at least), every cordova plugins and ionic components/lazy loading are working well. So what plt.ready is waiting ? I replaced every plt.ready in my app with the deviceready event and the app looks way faster if you do not have a wifi connection (80% of my users).

Maybe there is a reason I am missing., Thanking you in advance,

Steps to reproduce:

  1. Cut your internet on your iPhone or simulator
  2. Launch your app
  3. Just see when the platform.ready promise is resolved

show

Which Ionic Version? 1.x or 2.x

3.x

Run ionic info from terminal/cmd prompt: (paste output below)

global packages:

@ionic/cli-utils : 1.2.0
Cordova CLI      : 7.0.1 
Ionic CLI        : 3.2.0

local packages:

@ionic/app-scripts              : 1.3.7
@ionic/cli-plugin-cordova       : 1.2.1
@ionic/cli-plugin-ionic-angular : 1.2.0
Cordova Platforms               : android 6.2.3 ios 4.4.0
Ionic Framework                 : ionic-angular 3.3.0

System:

Node       : v6.9.1
OS         : macOS Sierra
Xcode      : Xcode 8.3.2 Build version 8E2002 
ios-deploy : 1.9.1 
ios-sim    : 5.0.13 
tgensol commented 7 years ago

I wanted to put this issue in ionic not ionic v1. Closed