Significant delay launching app from Springboard - ios

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!

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:
info.plist is well-formed and doesn't contain unnecessary references or other tags;
launch images are not crazy large;
the .ipa is not crazy large;
As xmlhack mentions, that you don't have something odd happening with static variables.

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.

Related

How to debug intermittent slow iOS iPhone app load times in Xcode?

I have an iOS Xcode project that previously would load fast, but from time to time, now will hang for five seconds or more during loading. When the app is run on an iPhone, the launch screen displays instantly, but sometimes, not always, and unpredictably, the app just hangs for around 5 seconds or more until the actual interface is displayed. It occurs both on the simulator and device across different iOS versions 7, 8, 9.
Recently, a UIView's class that contains a drawRect function was changed slightly, it has an outlet connection to one of the ViewControllers, but no significant changes made overall. One ViewController has code in the ViewDidLoad, ViewWillAppear, ViewDidAppear functions. All these things I'm investigating if they are impacting the load time.
When I terminate the app, the next time I try running it, it loads super fast without issue. I have no idea what to make of this load behaviour.
Questions
1 - What methods can I use in Xcode to debug an app that loads slowly at irregular and unpredictable times?
2 - What obvious items should I be on the look out in the project that typically cause slow or prolonged load times?
3 - Does Xcode include tools to monitor the processes operating live while loading occurs?
4 - Is it possible to print output for load processes I can review?
Any experienced advice really appreciated. Thanks.
Not sure if you have looked instrumentation. It is the best way to determine this kind of issues with your app.
https://developer.apple.com/library/watchos/documentation/DeveloperTools/Conceptual/InstrumentsUserGuide/index.html
When I terminate the app, the next time I try running it, it loads super fast without issue. I have no idea what to make of this load behavior.
Do you mean exiting the app? Or actually killing it? Cause if it is the former, then the reason is the app was just launched from a suspended state.
I would suggest take a closer look at didFinishLaunchingWithOptions:, and check if you are doing something that takes more time than needed. Run your app with the time profiler instrument, it will tell you where is your bottleneck.

LibGDX displays black screen while app is paused but still visible (e.g. during in-app purchase password dialog) on iOS

I converted one of my apps over to LibGDX.
In the earlier version, when I launch an in-app purchase and iOS shows the dialog to ask the user for their password, my app would stay visible and running (animations would update) in the background behind the dialog.
After the switch to LibGDX (and no other changes regarding purchasing), the app now disappears and the background behind the password dialog is just black. Right before this happens, LibGDX reports [debug] IOSApplication: paused and right when my app comes back to life, I get the message [debug] IOSApplication: resumed.
Is there any way to have LibGDX keep updating my app's screen while it's paused (preferably only if it is still partially visible, though), or at least keep displaying the last drawn frame rather than switching to black?
PS: I have continuous rendering turned off.
I found a way to fix the problem: Get rid of LibGDX.
Here's how: https://stackoverflow.com/a/35094695/1217178
Disclaimer:Clearly this isn't a true answer to the original question, but unfortunately I don't have the time to go hunting for bugs in libGDX, especially since my app is almost 1MB (15%) smaller and starts faster without it, too. But if someone else comes across this issue and figures it out, please do post your answer and I will accept it instead of this one.

App Store Rejection – App works in testing but not when sending to the App Store

Boy, this is frustrating.
I sent in my app to Apple after months and months of development. It was quickly rejected due to the fact that they said it was unresponsive at the home screen. Here is the screenshot they sent me:
Now, when I build the exact archive of the app that I sent them, I have no such issues:
The buttons were created in the storyboard file and were IBOutlets, but the highscore label that you see was created programmatically. Is it possible that the storyboard file didn't upload properly? I have already messaged them in the resolution center about it and tried to submit it again to see if it would work next time, but I was wondering if anyone knew anything about this issue.
From above screenshot, I've understand something that issue related with network error. See, they were tested with flight mode. According to apple guidelines, it should be go on in home screen without much more delay. At least show an alert for this issue. Just test with this scenario, you will get this.
When they said it was unresponsive, it may be due to the fact that its stuck for certain reasons, check if you make any API call at the viewLoad method, also, if the UI may turn unresponsive incase you are performing some heavy operation on the main thread, try using a background thread of these operations
It's been an extremely long time, but I thought I'd say what was wrong in case anyone comes across this in the future. Basically, I had created the buttons in Interface Builder but was re-instantiating them in viewDidLoad of my view controller. Since IBOutlets are weak properties, they were thus being released. Why that wasn't happening when I ran it on my computer, I have no idea. Still puzzles me to this day.

Deadlock/hard freezing on UITextField/UITextView/UISearchBar becomeFirstResponder

I'm experiencing intermittent hard freezing of multiple apps on UITextFields, UITextViews and UISearchBars becomingFirstResponder. The freeze happens before the keyboard comes onto the screen. The app does eventually seem to recover, but takes a very long time. Most users will loose patience before this happens however.
The common factor between the apps seems to be registering for UIKeyboardWillShowNotifications, but a trivial amount of work is done in the selectors registered for this notification.
Is anyone else seeing this and/or found a solution?
I had same problem. In my case, it wan only iPad and stuck on [textView becomeFirstResponder] for about 3 minutes. I delete the app and downloaded my app from app store and confirmed the live version does not have the issue. I went back to Xcode and run after restoring all changes I made to fix the bug. Everything works fine now.

Launch iOS app faster

I figured out that some iOS apps are launching really faster (e.g. YouTube-from google,Skype,iTunes).
I created an empty application (used standard tabbed application template) and i did not change any code at all, just added splash images. When i tested (tried both developer and Ad-Hoc provisioning profiles to sign to check whether if there any difference), it did not launch as fast as the above mentioned apps.
When i tap the app icon on the device app icon get darker for about 0.2-0.5 seconds and then start showing splash image.
My question is how to make my app launch really fast, and is there any trick to show splash image very quickly? (i wonder how my empty application launches slower than above mentioned apps?)
Thanks
I think you also may be falling for a trick: at least for the iTunes app, Apple is overwriting the splash image with one that looks very much like the app while running, which creates the illusion that the app loads immediately. Try it:
Launch iTunes (or "Music") and start it playing, then go do something else to cause the system to swap the process out as much as possible (say, browse some heavy websites). Then relaunch iTunes and immediately try to pause the audio. On my iPhone 4, it takes about 3 seconds before the controls catch up: the position indicator will jump to the correct location, and until that time, the "play" button is inactive - you can't pause the audio. You're seeing a splash image that is meant to make you think that the app is launching immediately, even though it's really taking a few seconds to launch.
I've also noticed Chrome for iOS doing the same thing. I actually dislike this design decision, because it communicates that the app is ready before you can do anything with it.
i did not changed any code at all just added splash images
The loading images are not intended to show splash images, they are intended to show a static version of your application's interface to give the illusion that your application is loading more quickly than it really is.
Splash images are specifically warned against by Apple in the HIG.
Stop abusing loading images to show splash images, start using them properly, and your application will look as if it is loading more quickly.
link to as few frameworks as possible, we tried this at WWDC and linking to many frameworks creates a noticeable delay even before the main() method is called!
no matter how fast your code itself is!

Resources