Automagically: Easy Splash Screen (Default.png)

In my recent post about reducing load time for iOS apps, I discussed the importance of a proper Default.png. In the past I’ve made my Default.png “splash screen” image manually from mock ups and screenshots from the simulator — it can be very tedious with mixed results.

There is another way.

Before I show you, you need to know something — it uses a private API function. What does that mean? You need to remove this code before you submit your app to the App Store or it will be rejected. Private APIs are functions not to be used by anyone but Apple. So without further ado:

[[UIApplication sharedApplication] _writeApplicationDefaultPNGSnapshot];

That’s it. You should put this code somewhere in your viewDidLoad function before you load all (but after you load some) of your UI elements. You’ll have to be the judge of the appropriate timing. Once this function is run, it’ll store a PNG screenshot of your application in the following location:

Library/Application Support/iPhone Simulator/VERSION/UDID/Caches/BUNDLEIDENTIFIER/AppSnapshots/

QUICK! Get the screenshot and get outta there — then remove that function.

Icon already includes gloss effects but still glossy!

When we released Namely for iPhone, the first few days the app was in the store, the icon was glossy. This was not our intention. When you view the app in the store, it had the gloss effects automatically applied by Apple but once you installed it, the icon displayed on the springboard without the gloss effect (as intended). This was pretty annoying.

We had UIPrerenderedIcon (or ‘Icon already includes gloss effect’) in our info.plist but it still was having this issue with the app store. I did a bit of research and found that some people used jpg instead of png when uploading their 512×512 icon to the app store. You can only edit your icon when you’re app is in some sort of approval or waiting for approval status, not when it’s actively available in the store. I had a few changes I wanted to push in an update so I came up with 1.0.1 and uploaded it to the store. I changed to the jpg and still had gloss!

I got to looking around in the plist and realized that the UIPrerenderedIcon was nested inside of “Icon files (iOS 5) >> Primary Icon >> Icon already includes gloss effect”. So I put simply moved it out into the root of the plist and rebuilt. Submitted to the app store and viola! no more gloss.

My guess is because this key was nested the store didn’t see it so it put the gloss effects on as if the key were not there.