21

I created a new project with xcode 6.0.1 using swift and set deployment target to iOS 7.0.

The screen size is wrong for iPhone 5s in iOS7 - it shouldn't have any black spaces.

blacks spaces in iPhone 5S

RichardBernards
  • 3,146
  • 1
  • 22
  • 30
saranpol
  • 2,177
  • 1
  • 23
  • 22

9 Answers9

53

In new Xcode 6 projects, you don't have these Default-568h@2x.png images.

Do the next steps to fix it:

1) Open your Images.xcassets and look for LaunchImage. It is probably missing.

Images.xcassets

2) In this case, click on + (located at the bottom) and click on New Launch Image.

3) Select your project target and open Build Settings tab. Look for "Asset Catalog Compiler - Options" section and then "Asset Catalog Launch Image Set Name", if it is empty type LaunchImage.

Asset Catalog Compiler

Voila!

jomafer
  • 2,655
  • 1
  • 32
  • 47
13

Try using Default-568h@2x.png image as splash.

Default-568h@2x.png

Pankaj Yadav
  • 601
  • 9
  • 23
  • Yes, this is the right trick to do. The only thing is, in Xcode 6, I did not see the file auto generated as before. I had to manually copy the Default-568h@2x from some old project. – marsant Oct 01 '14 at 22:25
10
  1. Project Properties -> General -> App Icons and Launch Images -> Click (Use Asset Catalog)

  2. Pop-up -> Click (Migrate)

  3. Delete (Launch Screen File)

Finish!!!

erenerdogan
  • 250
  • 3
  • 7
4

In Xcode 7, make sure in addition to what's been said about adding a LaunchImage you also add this entry in the plist file:

enter image description here

Omar
  • 105
  • 4
1

I imagine this won't help much, but I have exactly the same problem and found this link. Maybe it helps you, I coulnt find the answer:

Xcode 6 Storyboard the wrong size?

Community
  • 1
  • 1
1

put Default-568h@2x to your app bundle with dimension 640x1136. You can assign launch images using xcode catalog assets alternatively.

Akshit Zaveri
  • 4,166
  • 6
  • 30
  • 59
1

Under project properties, ensure you are using the "asset catalog" for launch images. I found my project was using a custom location by default. By switching over to "Use Asset Catalog", the top/bottom black margin went away.

sh4k
  • 306
  • 2
  • 5
1

I was facing this problem in XCode8. I figured it out that Launch Screen File was not set.

Go to : project Properties -> General -> App Icons and Launch Images

Click on drop down and select Main.storyboard.

enter image description here

Community
  • 1
  • 1
PANKAJ VERMA
  • 3,450
  • 1
  • 16
  • 15
  • Thanks for sharing this - so easy - but I was overlooking it. I tried to add a splash screen - wouldn't work and when I deleted all references, when I would do a build my view was distorted and not all the objects were showing - even after a restore from the previous day's backup. Used your suggestion - back to normal. Sad how complicated Apple makes what should be an easy feature to add - and keeps changing it from one Xcode version to the next. Not everyone sits in front of Xcode 6 days a week... – user3741598 Dec 21 '16 at 03:35
0

This issue is solved when you add the Splash screens for Defualt@2x.png and Defualt-568h@2x.png

Atef
  • 2,872
  • 1
  • 36
  • 32