0

My app is an enterprise app. When I click on the app icon, the icon is dimmed, and stucks for 4-5 seconds.( It depends, some users report it stuck for 10 seconds.)

I connect the device to look into the console. I found some exception is through. But no idea if it is related and what it really did. Any idea? enter image description here

Sr Julien
  • 494
  • 1
  • 8
  • 27
Siu Chung Chan
  • 1,686
  • 1
  • 14
  • 31

1 Answers1

2

Looks like your app has an issue with startup time. Apple says that 400 milliseconds is a good launch time. If your app loads more than 20 seconds iOS will kill the process. The main reasons of such issue can be:

  • A lot of frameworks in the app
  • Project has a lot of classes, categories
  • Project is written in Objective-C (Swift has optimized runtime)

Try to add the environment variable DYLD_PRINT_STATISTICS in Scheme: enter image description here

You will find in console launch time statistics: enter image description here

Also check -application:didFinishLaunchingWithOptions: method in AppDelegate. If you perform some heavy operations remove them. You can measure code execution time like described here or precise methods described here .

For more information take a look at:

Community
  • 1
  • 1
Oleg
  • 488
  • 4
  • 14