iPhone - multiple targets multiple launch images nightmare
ios, ipad, iphone, xcode
Solution
It's because the images are renamed to Default.png (or another name same for each target).
You need to do it like this:
Add a entry in your plist for each target. iPad: Launch image (iPad) iPhone Launch image (iPhone)
Use a different string for each target. Place the images with that string to your resource files (also make sure that only the desired images are active in the desired target).
Example:
Target 1
- plist: Launch image (iPad) = AAADefaultiPad
- Place files: AAADefaultiPad@2x.png and AAADefaultiPad.png
Target 2
- plist: Launch image (iPad) = BBBDefaultiPhone
- Place files: AAADefaultiPhone@2x.png and BBBDefaultiPhone.png
Edit 1: Place the images as you would place a image file into your graphic resources. Do not place it in the image space under Target "Summary".
Works for me pretty well.
Problem
I have a project with 2 applications in two flavors each, iPhone and iPad. So, the project has 4 targets. It is obviously not universal. To easy things, lets call each application AAA and BBB. The launch images are named like this: AAA for iPhone - AAAiPhone.png - AAAiPhone@2x.png AAA for iPad - AAAiPad-Portrait@2x.png - AAAiPad-Portrait.png - AAAiPad-Landscape@2x.png - AAAiPad-Landscape.png The BBB images have the same name structure, with BBB instead of AAA in the name. I have added this UILaunchImageFile to each plist, like this: - AAA for iPhone ... Launch Image (iPhone) = AAAiPhone.png - AAA for iPad ... Launch Image (iPad) = AAAiPad.png - BBB for iPhone ... Launch Image (iPhone) = BBBiPhone.png - BBB for iPad ... Launch Image (iPad) = BBBiPad.png When I drag the images to the proper place holder on Xcode it goes fine for AAA, but when I do that for BBB it overwrites all AAA images. It appears to be ignoring the info.plist information. Any clues? thanks