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
AAA for iPad
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:
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
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
Target 2
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.
I've written up instructions along with a GitHub project.
https://github.com/brennanMKE/MultipleTargets
There are many steps and details to handle for everything you will want to do to fully support multiple target builds from a single Xcode project. That sample addresses...
I had some problems regarding multiple targets(iPhone) X multiple launch images/multiple icons when I had to add Retina icons & launch images. To solve this, I had to do do the following in plist:
It is actually very simple:
Define "Launch image" in plist with a string you want to replace "Default" in the file name. Default.png becomes MyAppName.png etc.
Simply create your filenames conforming with default filenames such as:
MyAppName.png
MyAppName-Landscape@2x~ipad.png
MyAppName-Landscape~ipad.png
MyAppName-Portrait@2x~ipad.png
MyAppName-Portrait~ipad.png
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With