I'm wondering if anyone else has run into this problem. I read a few threads here about the proper naming and adding the key in the plist. I am able to get this working in the simulator for both the iPhone and iPad and on the actual iPhone device but not the iPad.
Here is what I have:
iPhoneLaunchImage~iPhone.png
iPhoneLaunchImage@2x~iPhone.png
iPadLaunchImage-Portrait~iPad.png
iPadLaunchImage-Portrait@2x~iPad.png
iPadLaunchImage-Landscape~iPad.png
iPadLaunchImage-Landscape@2x~iPad.png
In my MyApp-Info.plist, here is what I have:
<key>UILaunchImageFile~ipad</key>
<array>
<string>iPadLaunchImage-Portrait~iPad.png</string>
<string>iPadLaunchImage-Portrait@2x~iPad.png</string>
<string>iPadLaunchImage-Landscape~iPad.png</string>
<string>iPadLaunchImage-Landscape@2x~iPad.png</string>
</array>
<key>UILaunchImageFile~iphone</key>
<string>iPhoneLaunchImage~iPhone.png</string>
I also tried doing this by only using a string value for the iPad instead of an array and only put
<string>iPadLaunchImage</string>
and again it worked in the simulator but not on the actual iPad.
Any help appreciated.
In case someone runs across this issue and is as challenged as I was, this is actually very simple. I can't believe I made it so difficult. I simply needed to read carefully the documentation and do exactly as it says.
Create your launch images, as of iOS 5, at least four for the iPad and two for the iPhone. Name your images as follows: (The name I am using is only an example, you can use any you want.)
iPadLaunchImage-Portrait.png
[email protected]
iPadLaunchImage-Landscape.png
[email protected]
iPhoneLaunchImage.png
[email protected]
Make sure you use a distinct name for each device. You have more options available for the iPad, which you can read about in the documentation. Link is provided in the other answer.
Place all of these images in the top of your app's bundle directory. Then all you do is add two keys to YourApp-Info.plist.
Launch Image(iPad) string iPadLaunchImage
Launch Image(iPhone) string iPhoneLaunchImage
That's it. Images will load properly for both devices. Note that in the Info-plist file you don't put the .png, only the base name you used for your images.