15

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?

Cruinh
  • 3,611
  • 4
  • 38
  • 45
  • 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 Aug 23 '10 at 21:09
  • 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 Aug 23 '10 at 22:07
  • 1
    This question is very well explained on this entry http://stackoverflow.com/questions/2634898/splash-screen-for-universal-application-for-ipad-and-iphone – Jose Muanis Oct 24 '11 at 04:26

4 Answers4

14

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

bentford
  • 33,038
  • 7
  • 61
  • 57
  • 1
    How does the iPhone 5 fit into this? – zekel Sep 14 '12 at 16:58
  • Here's a tip that helped me get the filenames right and accepted by Xcode. Remove your images from your project and then add your `MyAppName` info.plist entry as described. Then drag your images onto the Xcode 4 Target summary image drop-points. They will then be copied in the root of your project folder with your `MyAppName` naming scheme instead of the Default.png filenames. If like me you don't want them there, you can then remove the reference from your project, move them to your images folder and then Xcode will pick them up. – zekel Sep 14 '12 at 18:40
  • How this works in iPhone 5 is currently undocumented. As soon as it shows up in the docs I'll update my answer. – bentford Sep 14 '12 at 18:52
  • 1
    on iPhone 5 you use the suffix -568h, so you might use Default-568h@2x.png for example. You have to have a file with that exact name in your app for iPhone 5 to be supported at all (you get an Xcode warning if you don't) but it seems to be ok to specify that your launch image is called "foo.jpg" and then have a foo-568h@2x.jpg, which it will use in preference to the Default-568h@2x.png – Nick Lockwood Sep 26 '12 at 11:43
  • This really helped me - thanks. I did have to switch the Launch Images > Source (under Targets > General) to "Use Asset Catalog" as well, though (the default setting is "LaunchImage", which was picking up the iPad launch images but not iPhone ones). Not sure if this is an iOS7-specific quirk as this is my first app... – MassivePenguin Oct 09 '13 at 07:34
9

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>
Cruinh
  • 3,611
  • 4
  • 38
  • 45
3

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 !

Mostafa Berg
  • 3,211
  • 22
  • 36
-1

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

Community
  • 1
  • 1
Tylerc230
  • 2,883
  • 1
  • 27
  • 31