2

Im developing an app in ionic and its working perfectly fine in android, emulators and web (with ionic serve). But when is running in ios devices in transitions between pages suddenly it shows a white view instead the view that it have to display. This doesn't happen all time and i didn't figured out when specifically happen.

I appreciate any help.

4 Answers4

2

it is probably a javascript error. To find it, the best way is:

  1. first connect the phone with your mac (must be a mac) by USB.
  2. Open Safary (no Chrome or Firefox)
  3. In the Safary settings -> Advanced -> enable develop tools enter image description here
  4. Now on Safary will appear a develop menu on the top, click on it and you will see your phone and the app running, click on it. enter image description here
  5. In the develop tools, will appear all the console you normally see testing with ionic serve, but in the real device.
  6. Just use the app and when you get a black page check the javascript error on safary develop tool. enter image description here

I hope it helps, it did helped me a lot after discover it.

Adriano Spadoni
  • 4,540
  • 1
  • 25
  • 25
1

Finally I resolve it, it was a problem with transitions of ionic in ios. Adding this line to config in app.js like this

    .config(function($stateProvider, $urlRouterProvider, $ionicConfigProvider) { 
        $ionicConfigProvider.views.swipeBackEnabled(false);
    }

Disable all back navigations transitions with swipe.

0

For what I searched, it can be a lot of things.. What helped me to figure out my case was small commits. Anyway, I tried to use default param values and it doesn't work for my webview in iOS. If that's your problem too, you can see an alternative way to do default param values here: Set a default parameter value for a JavaScript function

didn't work:

function(param = defaultValue){}

did work:

function(param){    
  param = param ? param : defaultValue;
}
Community
  • 1
  • 1
Daniel Carlos
  • 268
  • 4
  • 6
0

Simply use can-swipe-back="false" on your ion-view element.

skuntsel
  • 11,624
  • 11
  • 44
  • 67