Installed the app on iPhone 6 iOS9 and here is what happened. Notice black bars on top and bottom. It works just fine on iOS8. How I can fix it?
I\'ve tried building
Swift 4.2
select LaunchScreen.storyboard if its empty
Did you migrate your app from an earlier version of Xcode? If so then Xcode is now making an assumption about your screen size and you need a way of indicating the actual screen size at run time.
There are two ways:
a) If you use a launch screen.
You are missing a LaunchScreen.storyboard file. Create a LaunchScreen.storyboard file and add it to your project.
b) If you don't use a launch screen.
Go to your Target's settings and choose General, then App Icons and Launch Images. Now set "Launch Screen File" to your "main.storyboard" (or another storyboard if appropriate)
For me the problem is i'm migrating my app from earlier version of Xcode and the project is missing LaunchScreen.storyboard file. I have just created LaunchScreen.storyboard and added it to launch Screen File. This did the trick.
In my case I have one asset with launch images however it was displaying the top and bottom dark bar as well.
I've tried the launch storyboard solution and yes it works but I didn't want to add a new file so, this is what I did to fix the issue:
That's it!
This one is if you do not use storyboard at all.
It occurs when you remove LaunchScreen
from Launch Screen File
in App icons and Launch Images
.
Instead of removing it from here go to info.plist and find Launch screen interface file base name
and remove LaunchScreen
, i.e. leave it blank.
It wont show in info.plist if you have removed LaunchScreen
already from Launch Screen File
. Then you can give any name in Launch Screen File
and it will appear and you can remove the name.
In my case, I have several targets in the project and each one has it's own launch screen images. The weird thing one of the targets looks fine but others have those black bars. The thing was in the name of Launch folder inside assets. Change name to LaunchImage solves the problem.