5

When I tap my app icon to launch it, it takes 0.5-1.0 seconds after the tap before the app actually opens from the Springboard - in other words, there's a significant delay between tapping the icon and the Springboard zooming into the app's launch image. I'm not seeing this with any other apps on the device (iPad 3). This is also happening on the iPhone 4, but not the iPhone 5.

In addition to this happening on first launch, it also happens when the app is backgrounded.

I went through and made sure there wasn't anything expensive going on in applicationDidFinishLaunching or appBecameActive - I even tried deleting everything except assigning the view controller to the UIWindow's root view.

Has anyone ever seen anything like this before? Any ideas on how to fix it? Thanks!

jscs
  • 63,694
  • 13
  • 151
  • 195
bmueller
  • 2,681
  • 1
  • 27
  • 45
  • Speaking from previous experience, it sounds like you're doing a bunch of legwork in `viewDidLoad` which is obviously prior to `viewWillAppear` & `viewDidAppear`. Do you mind posting your code from those methods? – Dan Jun 29 '13 at 03:27
  • It's actually not just happening during launch of the app, but also when returning to the app after it's been backgrounded, so I don't think it's `viewDidLoad`... Even after deleting just about everything from `becameActive` and `didAppear`, I'm still seeing the same noticeable delay. – bmueller Jun 29 '13 at 03:32
  • Without code it's going to be hard to guess. Are you making any synchronous calls or pairing with any external accessories? – Dan Jun 29 '13 at 03:38
  • No networking (or other synchronous calls) of any kind, and no external accessories. I've never seen an app get delayed before leaving the Springboard before, and it's even stranger that it's doing it not just at launch into the "welcome" view but also when coming back from the background into the "main" view. – bmueller Jun 29 '13 at 03:48
  • You don't have any logging or breakpoints in viewDidLoad or the app delegate methods, right? Also, check Xcode's console for the device. – Moshe Oct 02 '13 at 16:26
  • Do you have lots of static variables? – xmlhack Oct 02 '13 at 19:57

2 Answers2

2

If I read your statement

"significant delay between tapping the icon and...launch image"

then it's something that Springboard is dealing with. In other words, the delay is before your main() is called, so it's likely an issue with your app's static characteristics, either something declared in the info.plist or something with Springboard's ability to just load the app.

Some things I would check:

  1. info.plist is well-formed and doesn't contain unnecessary references or other tags;
  2. launch images are not crazy large;
  3. the .ipa is not crazy large;
  4. As xmlhack mentions, that you don't have something odd happening with static variables.
Chris
  • 8,527
  • 10
  • 34
  • 51
chad
  • 61
  • 4
  • I had this same issue (delayed launch occasionally) and this answer gave me the idea to check the launch image type, which turned out to be a JPG. I exported my photo as a PNG and reduced its size by 50%, worked like a charm. It's very frustrating having the delay so I hope this helps. – Ibdakine Oct 28 '16 at 05:57
1

I've found at least one reason why there can be a delay. Provisioning profiles. Lots of them.

I've had more than 400 of them when I thought about it. Removed all old ones and AdHoc and developer builds start time returned back to normal.

bealex
  • 10,004
  • 1
  • 21
  • 27