iPhone Contacts and Maps fast start

Apps on the iPhone can ship a ‘default.png’ in their bundle. When you start the app, it’ll first show this image, then load the rest of the app. The idea is, you can ship a picture of the start state of your app, and it’ll appear to have started very quickly. This is why some apps are unresponsive just after they start – they’re not actually started, you’re just looking at a picture. Other apps misuse this feature to display a splash screen. Urgh, splash screens.

Anyway, I digress. I have noticed that both the Contacts and Maps applications can change their default.png files. On start they both show you the state of the application as it was when you last saw it, rather than a simple default start image (most apps that I’ve seen ship an image of their basic layout, with the content removed, so it looks like the content loads a second after the app).

This is easiest to see in the Maps application. Search for a business, then touch the blue chevron to see details of that business. Quit Maps back to the home screen, and run something else (unlike 3rd party apps, Maps will stay running till forced out by some other app). Run Maps again. It will start up with the same view, but be briefly unresponsive till the app proper has started up. You may see the small map in the top-left redraw.

It’s a lot harder to get Contacts.app to do this, but the effects are far more obvious. The best way is to change the contents of your address list without using the application – sync in a new contact, or remove a contact. The first time you run the app, you’ll see the old list for a moment, then the new list. I first noticed this when I synced my iPod touch to another computer, changing all the contacts. Running address book showed me the old list of contacts for a second, then switched completely to the new list.

3rd party apps can’t do this – altering bundle files will change the app, and break the signing. Another thing that Apple apps can do and 3rd party apps can’t (though not all Apple apps to it. The Clock app is a perfect example of how I’d expect apps to start up). It’s subtle, but it means that Apple apps will appear to start faster, and record state better, than my apps. It a level playing field too much to ask for?

Update, 13th October: I was rude about splash screens. Craig points out that he doesn’t have anything better he could possibly display at startup. Anything that looks like the app running will just feel like an unresponsive start state, and will be wrong anyway. A blank screen is just entirely wrong. Splash screens might be the best of a bad lot.