Ionic 3 view disappears on ios


#1

Hello folks, I have been using ionic 3 for my app
Here is the ionic info:
cli packages: (/var/www/stuccco/node_modules)

@ionic/cli-utils  : 1.15.2
ionic (Ionic CLI) : 3.15.2

global packages:

cordova (Cordova CLI) : 7.0.1 

local packages:

@ionic/app-scripts : 3.0.1
Cordova Platforms  : android 6.2.3
Ionic Framework    : ionic-angular 3.9.2-201807062122

Every thing was working fine but now I am getting unexpected issue as follows(on ios):

  • Some of my views(ion-content) renders for a split second and then disappears.
    I am not facing this issues on newer iphones(7 + with ios 12) but the above issue exists in iphone 6 with ios 12
    please help me out on this issue.
    Thanks in advance.

#2

Finally solved the issue myself. I just updated my default webview to wkwebview, refer the link: https://ionicframework.com/docs/wkwebview/
It is now recomended to use wkwebview for ios for better experience. Moreover, the scrolling has improved a lot and gives feel of native here.
Keyboard can trouble you with wkwebview. As from my experience, content was not resizing after keyboard show/hide, so to overcome this issue please update your keyboard plugin to https://ionicframework.com/docs/native/keyboard/ and set the following line in your config.xml

  1. <preference name=“KeyboardResize” value=“true” />
  2. <preference name=“KeyboardResizeMode” value=“native” />
    For other options please visit https://github.com/ionic-team/cordova-plugin-ionic-keyboard