23

When iPhone 5 first came out we had to go through the silliness of adding a Default-568h@2x.png to the project to get the app to use the full height of the iPhone 5. In late 2014 are we still doing that?

We have asset catalogs and the LaunchScreen.xib file. Do we still need to add the Default-568h@2x.png file? If so, where does it go now? I've tried a few different things and I can't get rid of the black bars in a new app created with Xcode 6 GM.

JasonMArcher
  • 14,195
  • 22
  • 56
  • 52
soleil
  • 12,133
  • 33
  • 112
  • 183
  • 2
    What version of iOS is on your iPhone 5? I'm not positive but I believe the use of the "Launch Screen File" only works on iOS 8 devices. You may still need regular launch images/assets for iOS 7 and earlier if your app supports iOS 7 or earlier. – rmaddy Sep 11 '14 at 20:24
  • It's running iOS7. I'll try that. – soleil Sep 11 '14 at 20:26
  • 2
    There you go. You still need the launch images since it seems the Launch Screen File is only for iOS 8. – rmaddy Sep 11 '14 at 20:28

2 Answers2

34

As stated by rmaddy in the comments, if you are supporting iOS < 8, you still need to do this:

General / App Icons and Launch Images

Launch Image Source - select LaunchImage for asset catalog.

Add a 640x1136 image for the "Retina 4" option.

So I guess the LaunchScreen.xib is useless if you target iOS < 8, unless you want to update both that and the asset catalog when the image changes.

soleil
  • 12,133
  • 33
  • 112
  • 183
  • thanks for this and the location of launch screen should be set – leopic Oct 14 '14 at 17:48
  • "Launch Image Source - select LaunchImage for asset catalog." - Clarification for anyone else. Next to Launch Image Source, simply select asset catalog, and then the dropdown should be populated with "LaunchImage". – user3344977 Oct 25 '14 at 16:18
  • I added all the launch images of different sizes to assets folder. Still I see black bar on the top and below. – Satyam Nov 04 '14 at 10:13
  • Just adding the LaunchImages in the Images.xcassets from Genral/ App Icons and Launch images was ok for me. I had to add a image for 640x1136 – xarly Nov 08 '14 at 11:45
  • Came across this using Xcode9 whilst upgrading existing app to work with iPhone X. Had to create new file for launch screen storyboard, then updated project settings to not use asset catalog for launch image and use launch screen storyboard instead – Izzy Manpo Nov 14 '17 at 00:16
0

if you are not creating new Project, like changing or rename old Project, you should remove all Images.xcassets from Project.

then

Navigate to project settings

Under "App Icons and Launch Images" click on "Use Asset Catalog"

Select "Migrate" on the popup that appears. make new Asset.

it work pretty fine for me.

env is xocde6.1 iPhoneSimulator5/5S/6/6+ on iOS8