App closes on splash screen after update

I am maintaining an app that is already in the App Store and Google Play, but for iOS cordova platform it has been limited to version 4.3.1 - upgrading to any newer would cause the app to quit/crash after displaying the splash screen very shortly.
Now due to XCode 9.1 I am forced to upgrade to iOS 4.5.4 in order to compile the project successfully, except of course that it means: whatever cause it to quit instantly I now have to solve.
Does anybody have any idea what could cause it, or how to debug what exactly causes the instant crash?
For android it worked with no problem on platform 6.2.3, but after upgrading to 6.4.0 it has the exact same problem - which in a way is a good indicator, since it means it must be something in my code or a plugin vs. cordova or ionic.
Starting in browser the app works with no problem.
Starting in any emulator or any actual Android/iOS device it crash/quits instantly.

$ ionic info
cli packages:

@ionic/cli-utils  : 1.19.0
ionic (Ionic CLI) : 3.19.0

global packages:

cordova (Cordova CLI) : 7.1.0 

local packages:

@ionic/app-scripts : 2.1.4
Cordova Platforms  : android 6.4.0 ios 4.5.4
Ionic Framework    : ionic-angular 3.9.2


Android SDK Tools : 26.0.2
ios-deploy        : 1.9.2 
ios-sim           : 6.1.2 
Node              : v6.11.1
npm               : 3.10.10 
OS                : macOS Sierra
Xcode             : Xcode 9.1 Build version 9B55 

Environment Variables:

ANDROID_HOME : /Users/akn/Library/Android/sdk


backend : legacy

$ cordova plugin list
cordova-plugin-app-event 1.2.1 "Application Events"
cordova-plugin-app-version 0.1.9 "AppVersion"
cordova-plugin-appavailability 0.4.2 "AppAvailability"
cordova-plugin-badge 0.8.5 "Badge"
cordova-plugin-device 1.1.7 "Device"
cordova-plugin-facebook4 1.9.1 "Facebook Connect"
cordova-plugin-fcm 2.1.2 "FCMPlugin"
cordova-plugin-googleplus 5.1.1 "Google SignIn"
cordova-plugin-inappbrowser 1.7.2 "InAppBrowser"
cordova-plugin-local-notification 0.9.0-beta.1 "LocalNotification"
cordova-plugin-network-information 1.3.4 "Network Information"
cordova-plugin-splashscreen 4.1.0 "Splashscreen"
cordova-plugin-statusbar 2.3.0 "StatusBar"
cordova-plugin-whitelist 1.3.3 "Whitelist"
ionic-plugin-keyboard 2.2.1 “Keyboard”

Have resolved all conflicts/missings reported by npm install - upgrading angular dependencies from 4.1.3 to 4.4.6 and ionic-native dependencies from misc 3.x to mostly 4.4.2 in the hope it would fix it, but no luck yet.

Stuck for days, so idea ideas of what to look for or how to find data about what could cause the instant crash would be most welcome!

  1. Create a new project with ionic start and double check all the dependencies and plugin versions (compare to your project, make sure you didn’t accidentally go “too far” when upgrading your own app).
  2. Then add the additional plugins you have in your app to the new one. Does the new app still work and start?

In general when an app crashes, there is a logfile being generated. Using HockeyApp or similar you can report these to a web service and look at them, but with some googling you should also be able to find out how to look at them locally. Problem: You then have to understand the crash message which might need further posts here :wink:

Thanks for getting me started again!

I never got around to find the crash log, but I got it narrowed down to the FCM and google signin modules.
Think it used to run with API 9.0.0, but after adding FCM with --variable GOOGLE_API_VERSION=11.4.2 then the app started as it should again on iOS!
Read that for Android it was limited to support cordova-android 6.2.3, so after similar patching the build to work with the right API, it too could start again.

Now I just need test and find a version of FCM that is not in beta and actually also gives notifications on the newest iOS…

1 Like