We have an social networking app uploaded on the App Store.
When you click on the app icon from the home screen it launches for less than a second and then goes away.The app is visible when you double-click the Home button to see the recently used apps.
This is happening when the app is distributed using Mobile Device Management purchased through the Volume Purchase Plan. This is happening with a few devices but it works fine when directly downloaded from the app store. Recently, after upgrading the devices to the latest iOS version the problem started appearing on all MDM managed devices.
We have tried a number of things to figure out the problem. We tried restart the device. We made sure that the devices are using latest version of iOS. We even tried installing another free app from the App Store.
After going through a lot of forums we suspected that the applicationdidFinishLaunchingWithOptions might be taking sometime due to which system might kill the app before it even got to present the first view.
Fetching saved userId from keychain. If no userId creating new one, Firebase Initialisation, Branch.io Initialization (https://dev.branch.io/getting-started/sdk-integration-guide/guide/ios/#configure-xcode-project), Crashlytics Initialisation,Adding observers for reachability changes, Register for remote notification settings
Crash log : https://docs.google.com/document/d/1FVtY9J-ycRMs9wDQNzxLPZCN_Ikr6uc-909WgtVfmUc/edit?usp=sharing