Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

launch images for multiple targets with universal app

Tags:

xcode

iphone

I have multiple targets for my universal app and when I drag an image to the "Launch Images" summary section in xcode, it overwrites the launch image for all the other targets. Is there a way to have different launch images for each target? thanks

like image 520
David Avatar asked Aug 06 '11 16:08

David


3 Answers

I was able to figure out the solution using these directions, but here it is a little more explicitly.

For each target's set of launch images, you need to have a separate root filename and then @2x and -568h@2x versions of the same image for Retina and iPhone 5 displays. Then you add a row to the info.plist for each build target, specify that the key is "Launch image", and enter the filename of the standard-resolution version.

So, for example, say you wanted two build targets: Lite and Standard. You could have two sets of launch images:

Lite:

Default.png
[email protected]
[email protected]

(in this case you don't have to specify a launch image key in the info.plist, since it will use Default.png by default)

Standard:

Default-Standard.png
[email protected]
[email protected]

Then you'd select the "Standard" build target in xcode, click the info tab, right click one of the rows and click add row. It's a little confusing because when it adds a row that row has a random key value already entered instead of a blank one. Click the newly added key name and change it to "Launch Image". Then in the Value space, you'd enter "Default-Standard.png". Click the "Summary" tab (next to the info tab) and scroll down and you should be able to see correct previews of your launch images.

Hope this helps!

like image 164
Toby Avatar answered Oct 30 '22 14:10

Toby


You can configure "Info.plist file" key-value inside "Build Setting*" for project. In different plist files you can specify startup image and other settings if out want.

like image 1
Serhii Mamontov Avatar answered Oct 30 '22 14:10

Serhii Mamontov


I had everything working by using a different plist file for each target, and adding suffixes as recommended (@2x, -568@2x, and in my case, -Landscape for iPad).

However, only a blank screen was showing for an iPod running 6.1, even though it showed correctly on the iPhone 5 also running 6.1, and on the simulator. I ended up having to add "Default.png" copies of the 320x480 splash to each target, using the "Target Membership" in the File Inspector to control which target the image should be used for.

like image 1
Scott Driscoll Avatar answered Oct 30 '22 16:10

Scott Driscoll