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 Launch Screen object from the New File... dialog
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)
My App does not use a launch image. Setting the "Launch Screen File" to my "main.storyboard" file fixed the issue for me.
This setting can be found under "Target->General->App Icons and Launch Images"
Use the following link for more information: http://oleb.net/blog/2014/08/replacing-launch-images-with-storyboards/
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.
I'm using xcode 7.2 . At first, I created a LaunchScreen.storyboard file, as Potassium Permanganate suggested, and it worked! However, I didn't want a launch screen, so I tried setting Main.storyboard as Launch Screen File and it did the trick!
When you migrate your app from earlier version of xCode to xCode 6 or xCode 7, you will face this issue.
For iOS 7 and earlier, developers need to provide separate launch images for all screen sizes, resolutions and orientations their app supported.
In Xcode 6 or later, there is another option. You can specify a storyboard whose initial view controller will then be used as the app’s launch screen. Use below steps:
Create a blank storyboard file named LaunchScreen.storyboard.
Go to your target settings and, on the "General" tab, select the storyboard as your Launch Screen File in "App Icons and Launch Images" section. Xcode will add a corresponding UILaunchStoryboardName key to your app’s Info.plist. When this key is present, Xcode will prioritize it over any launch images you might have set.
Delete the older app from simulator and clean the project.
Cheers :-)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With