3

I just started learning Swift. It's been only a month, and I can assure you that I'm not doing anything fancy. Yet, the launch screen on the simulator is taking a long time to disappear before the app starts. It stays on for at least 5 seconds, and it takes another 2.5 seconds to slowly fade away. And as it fades out, the first view of the app slowly fades in. It was working fine (took only a fraction of a second) until a couple of days ago when this started happening suddenly while I was working on a sample app. Here are things I've confirmed:

  • During the initial 5 seconds, the app won't accept any user interaction. But during the 2.5 seconds of fading, it responds to touches.
  • This is a systematic problem because ALL sample code shows the same problem.
  • Even a new project, without any modifications, shows the same problem. I tried both "Game" and "Single View Application". After the name of the project is displayed as a launch screen, it takes about 8 seconds for the "Hello World" to appear completely. (When "Game" is selected.)
  • Restarting Xcode and rebooting the Mac do not help.
  • Updating to Xcode (6.4) does not help. My Xcode was 6.3.x (I believe it was 6.3.2 before the update).
  • Reinstalling a new copy does not help. I deleted the newly updated 6.4, and re-installed a new copy of 6.4.
  • The only similar incident I could find was this link, which did not provide the answer.

I was working on a simple practice program. It ran successfully just like it did numerous times before. Then, I made some minor changes to the code (nothing fancy --- just some trivial changes.) And the next time I pressed the RUN button, I noticed that the launch screen took a considerably longer to disappear. After that, it just won't go back to the way it was.

Could someone please advise the cause of the problem and the solution? Thank you very much.

Community
  • 1
  • 1
KGS
  • 41
  • 3
  • 1
    Compile your app for profiling (CMD+I) then choose "Counters" in Instruments, then click on the red dot to launch the profiling. Let your app load, wait for the launch screen to disappear, then click pause or stop in the profiler. Choose "View/Snap track to fit", select a group of peaks in the track, then inspect the threads, you will find which operations are taking time during launch screen. – Eric Aya Jul 06 '15 at 09:17
  • 1
    Do you have Slow Animations turned on? Go to the simulator and check under Debug. – ABakerSmith Jul 06 '15 at 09:53

1 Answers1

3

You may have Slow Animations turned on. Go to the simulation and check under Debug:

enter image description here

ABakerSmith
  • 22,759
  • 9
  • 68
  • 78