19

I have an App that was created a long time ago and updated it to use Storyboards. All the views have been rebuilt and hooked up. However, the App does not use the entire height of an iPhone 5, even though in Storyboards, it shows they adjust based on the size of the screen. In fact, none of the startup screens show up at launch. It's just a black screen.

I do have a full size startup image appropriately sized and named. And it shows up in the General tab of the settings. Am I missing a setting or something that needs to be changed? I have tried everything.

Additional note: I have a feeling it has something to do with the startup screen not showing up on launch. Even though the setting is there with all three startup screens. It's just a blank black screen that appears during startup.

Michael Reiland
  • 849
  • 3
  • 8
  • 19

10 Answers10

36

If you put your launch images in the asset catalog, this might be the problem:

In the main project settings (when you click on the top entry in the file browser) under "General", scroll down about halfway to "App Icons and Launch Images". There's an entry in there for "Launch Images Source". You'll probably see a button that says something like "Use Asset Catalog". When you click it, Xcode will ask you to "migrate" your launch images to the asset catalog. Go ahead and do this, although it's probably just going to create a new empty launch image set, which you can later delete. Then after that's done, you should see a dropdown where the button was, and in there you can select the actual launch images. Then if you want, you can go into the asset catalog and remove the launch image set that Xcode just created.

See the photo below, make sure Launce Screen File has an entry!

enter image description here

M Jesse
  • 2,213
  • 6
  • 31
  • 37
James Nick Sears
  • 930
  • 9
  • 16
  • This fixed my problem. Everyone mentions the Default-568h@2x.png, but nobody else I found caught this, thanks. – HPP Dec 11 '14 at 22:51
  • 6
    I followed all of the steps listed and it still did not work. After migration I had to set a 'Launch Screen File'. After I did that it worked like a charm. If you have an older project like I did, then you can create a Launch Screen File: File > New > File > User Interface > Launch Screen. – CaseyB Jul 12 '15 at 00:54
  • Nice answer, fixed my issue! – Kitson Sep 23 '15 at 08:11
  • For me the solution was putting a value in the third box. `CDVLaunchScreen.storyboard` in my case – Coo Nov 16 '17 at 08:54
  • Thanks for this. This is *far* from obvious! – yarrichar Apr 02 '18 at 10:39
4

Just add the splash image for iPhone 5, (640 x 1136)

zaheer
  • 893
  • 13
  • 27
2

Do you have the launch (default) image with size 640 x 1136? If you do not have this image you should add image with name Default-568h@2x.png and with size is 640 x 1136.

Without this image iOS thinks what your app does not support the new dimension.

AppleDocs

Andrew Romanov
  • 4,774
  • 3
  • 25
  • 40
2

Just came across your post while searching for something related - not sure if you've fixed it yet but I had an issue when updating my app to include retina-resolution images, and they weren't being picked up by the app.... until I spotted the Target Membership tick-box in the File Inspector for the image.

The new images that I had added to the solution were not ticked for my app in the File Inspector, so weren't getting compiled in - once ticked, they were included and displayed in the correct context.

Jools
  • 152
  • 2
  • 11
2
  1. Create a new project (Single View Application).
  2. Drag the LaunchScreen.storyboard into your project (Check "Copy items if needed").
  3. Select the copied "LaunchScreen.storyboard" as the "Launch Screen File".

I tested with a no xib/storyboard app in Xcode 7 GM.

Ben Scheirman
  • 40,531
  • 21
  • 102
  • 137
hiroshi
  • 6,871
  • 3
  • 46
  • 59
1

You’re probably missing the Retina-4" version of your launch image; the system will launch your app in 3.5" mode if that’s not present. If you currently have, say, Default.png and Default@2x.png, add a 640x1136 version named Default-568h@2x.png.

Noah Witherspoon
  • 57,021
  • 16
  • 130
  • 131
1

I faced the same issue too. In my case I am using a MainWindow.xib file.

And when I print the frame of Window its {0,0}{320,568} but the app did not respond to the area after 480 px.

What I did , is to open the Mainwindow.xib file in interface builder and set full Screen at Launch option selected.

I am attaching the screeshot where you can find this option.

enter image description here

this works out for me. You also try to find that If you are using a Mainwindow.xib then apply the same.

Hope it will help you to solve your issue. Enjoy coding..!!!

Sahil Mahajan
  • 3,922
  • 2
  • 29
  • 43
0

Your app has been compiled with iOS 5 or earlier and you are viewing it on a device with iOS 6 or up.

set target of your application as iOS 7 in Xcode and use Auto layout constraints to make it work on both devices. I will suggest you to have multiple storyboard if you want to support iOS 5 or earlier because they don't have auto layout constraints.

You need to compile your code with iOS 6 + SDK and use Auto layout constraints.

//Edit: if you are already using iOS 6+ as your deployment target for your project

If your iOS is set to 6 and up check your storyboard settings if your storyboard's deployment target is iOS 6 and up.

Community
  • 1
  • 1
Kunal Balani
  • 4,739
  • 4
  • 36
  • 73
0

If you are using the launch images asset catalog. You might not have added images for the retina placeholder. Just add images there as well. You can probably add the same image as the 2x section there. Then modify the contents.json in the assets folder so that duplicate images are not created for the same.

vj9
  • 1,546
  • 1
  • 11
  • 18
0

I followed all of the steps listed and it still did not work.

After migration I had to set a 'Launch Screen File'. After I did that it worked like a charm. If you have an older project like I did, then you can create a Launch Screen File: File > New > File > User Interface > Launch Screen.

user18853
  • 2,771
  • 1
  • 21
  • 17