Launch iOS app faster - ios

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!

Related

showing splash screen on cold start of app links

I'm adding app linking to my android app and I'm noticing on cold starts there's this long period of a white screen, which the user could interpret it as the app is not responding.
I have a splash screen for normal operation of the app on the main activity using a special theme, but it looks like app linking bypasses that activity so is there a way to show a splash screen on the other screens when the app is accessed by a link action?
EDIT:
quick summary, the splash screen appears during the normal use of the app but when a link triggers the app to open, it's not.
I figured out a solution for myself.
I simplified the intent filters to all call from the main activity that has the splash screen so it will appear now on cold starts.
this cleaned up a few other issues so it's a win overall for me.

Determining if assets need to be re-cached in memory

Assume a game app, where user loads some contents into memory during first open. Afterwards they can:
Move app into background
Lock device
Close app completely
Get a phone call
etc...
Is there a way to know when our app's contents are no longer in memory or something of similar sorts to determine when re-caching of assets is required?
I studied few game apps and they tend to do one of the following
Show loading screen every time app comes back from background
Show loading screen only if device was locked or closed (app is still in the background)
And I'm interested in achieving no.2 to not show loading screens unnecessarily each time app comes back from the background.
You can use AppDelegate method applicationWillTerminate
https://developer.apple.com/documentation/uikit/uiapplicationdelegate/1623111-applicationwillterminate
And notification willTerminateNotification
https://developer.apple.com/documentation/uikit/uiapplication/1623061-willterminatenotification
If Application not terminate you don't need show any loading screen.

3D Touch Quick Actions really slow to launch (restarts the app instead of resuming?)

I've tried my best to look for a similar question on this site and on Google, but I couldn't find anything.
I have tried adding 3D Touch Quick Actions to my app, following one of the many tutorials found on the internet.
The problem is, everytime I perform the action from the home screen (testing on a 6S Plus), I see the LaunchScreen.storyboard screen and I have to wait a couple of seconds for the app to launch. This happens even if i just backgrounded the app. If I just tap the icon, I am instantly taken back to the last screen, but if I use the shortcut, it looks like the app restarts instead of resuming.
Is this the intended way of Quick Actions to work? Because it seems different to me with the Apple stock apps.

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.

Significant delay launching app from Springboard

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.

Resources