15
votes

I'm following the iOS Programming guide on "Providing Launch Images for Different Orientations" and can't seem to get my iPad-specific launch images to work. If I'm reading the docs right, "Default~ipad.png" should be used as the launch image if I launch my app in the iPad simulator, but instead it's using my "Default.png".

If I tell the simulator to run as an iPhone4, it does correctly use my "Default@2x.png". But that just leaves me more confused as to why the iPad version isn't working.

Anyone know how to make iPad-specific launch images work?

4
Just ran into this now myself. Rebuilt the app countless times, made sure it was the right size (768x1004), confirmed Default~ipad.png was in the bundle -- no idea why this doesn't work as documented.Shaggy Frog
Try defining an iPad launch image in your Info.plist like in the answer below. You might need to use something other than "Default" for the base name.Cruinh
This question is very well explained on this entry stackoverflow.com/questions/2634898/…Jose Muanis

4 Answers

14
votes

There are a few ways to do this. My preferred way is from the "iOS App Programming Guide"

Providing Launch Images for Different Orientations:

  1. In Info.plist, set UILaunchImageFile to a base name: 'MyAppName.png'

  2. In your bundle, create files using this naming structure:

<basename><orientation_modifier><scale_modifier><device_modifier>.png

Example: I used all these names for iPad, iPhone, 1x and 2x:

MyAppName-Portrait~ipad.png
MyAppName-Landscape~ipad.png

MyAppName-Portrait@2x~ipad.png
MyAppName-Landscape@2x~ipad.png

MyAppName-Portrait~iphone.png
MyAppName-Landscape~iphone.png

MyAppName-Portrait@2x~iphone.png
MyAppName-Landscape@2x~iphone.png

// iphone 5
MyAppName-Portrait-568h@2x~iphone.png
MyAppName-Landscape-568h@2x~iphone.png

Caution: Put the @2x in the right place, this is the one case where it doesn't sit at the end of the filename

This method works particularly well when you have multiple build targets and you don't want to use the Default.png filename

9
votes

I managed to get it working by supplying an iPad-specific key in the app's Info.plist, rather than using an iPad-specific filename, as the docs suggest.

My Launch image for iPad is "iPadDefault.png" and I added the following key/value in my Info.plist

<key>UILaunchImageFile~ipad</key>
<string>iPadDefault</string>
3
votes

Since you're doing a universal app, the naming convention changes !

here's a quote form the Guidelines !

Include launch images for both iPhone and iPad. iPhone launch image will still be named Default.png and Default@2x.png. Name your iPad portrait launch image Default-Portrait.png (do not use Default.png as the iPad portrait launch image).

Meaning, there is no portrait/landscape, etc... you just have to rename the files this way:

iPhone(iPod): Default.png and Default@2x.png
iPad: Default-Portrait.png and Default-Portrait@2x.png (the @2x version is for the new iPad !)

Just had the same issue and this fixed it to me, I'm not sure if the left and right orientation is even available on the universal binaries !, but this def works for me !

-1
votes

I finally got both landscape orientation working on ipad, hi res landscape in iphone 4, and low res landscape on the rest using the following (1 landscape orientation for both phones, I use no other orientation or launch properties in plist):

    <key>UILaunchImageFile</key>
<string>Default</string>
<key>UISupportedInterfaceOrientations</key>
<array>
    <string>UIInterfaceOrientationLandscapeRight</string>
    <string>UIInterfaceOrientationLandscapeLeft</string>
</array>

My images are oriented as follows (note that both phone images are rotated 90 clockwise, but appear landscape on phone): Default-Landscape.png (1024 x 748) landscape orientation. Thius is 20 pixels less then the resolution of the iPad. Default.png (320 x 480) portrait orientation (when i look at it in finder it looks rotated 90 deg clockwise from the image above) Default@2x.png (640 x 960) same orientation as above