My app is full of bug on first launch and work normally on 2nd launch

Hi!

So I’m trying to export my application on the apple console and I succed to do it but I have a problem:

when I launch the app for the first time there are a lot of bugs (buttons not working, tap everywhere on the screen to could open the keyboard in a form, picture not displayed, etc…).

But when I kill it and open it again everything works perfectly! So I don’t understand what’s happening…
It all started when I started using XCode 10, before with the 9 I wasn’t having this problem.

And I don’t have this problem on Android, only iOS when I test the application on Test Flight.

Env:

  • MacOS Mojave 10.14.3
  • XCode 10.1
  • Cordova 8.1.2
  • Ionic 4.10.3

Command I used to build:


ionic cordova build ios -- --buildFlag="-UseModernBuildSystem=0" -prod -release

Did you remote debug the problem on the device already? Follow these instructions here to debug the problem in Safari dev tools: https://ionic.zone/debug/remote-debug-your-app#ios Look at the console and network tabs for errors.

Also post your ionic info output please.

Thanks for your reply!

So I’ve tried to do the debug in Safari dev tools and I didn’t found any bug in the console or in the network everything seems normal except that I have the bug on my iPhone until I refresh the app.

Ionic info:

Ionic:

   ionic (Ionic CLI)  : 4.10.3
   Ionic Framework    : ionic-angular 3.9.2
   @ionic/app-scripts : 3.2.2

Cordova:

   cordova (Cordova CLI) : 8.1.2 (cordova-lib@8.1.1)
   Cordova Platforms     : ios 5.0.0
   Cordova Plugins       : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 1.2.1, (and 10 other plugins)

System:

   ios-deploy : 1.9.4
   ios-sim    : 7.0.0
   NodeJS     : v11.10.0 (/usr/local/Cellar/node/11.10.0/bin/node)
   npm        : 6.7.0
   OS         : macOS Mojave
   Xcode      : Xcode 10.1 Build version 10B61

EDIT 1:

Okay So I found something, as you can see on the screen, the part that I have framed in red is supposed to be in the green part. So it means the device detect it upper than it’s supposed to be.

With that info I checked other module of the app and indeed all the components are displaying correctely but they are upper than they should be.

EDIT 2 : Just found a similar issue on github: https://github.com/ionic-team/capacitor/issues/814

EDIT 3: Another one: https://github.com/apache/cordova-ios/issues/417

I finally found a solution, the webview plugin of cordova wasn’t up to date so I just run this command:

cordova plugin rm cordova-plugin-ionic-webview
cordova plugin add cordova-plugin-ionic-webview@latest
1 Like