iOS 9 xCode 7 built app displays black rectangle instead of splash screen - ios

I know this question may seem like a duplicate of a few existing ones but its not.
I am struggling with this issue where universal (iPad/iPhone) application does not display the splash screen anymore.
Before upgrading to iOS 9 and Xcode 7, no such issues were present. After upgrading no changes were made to the splash screen in any way.
Tech data relevant to the question:
Supported devices are iPad (landscape only) and iPhone
(portrait/landscape)
I use "Launch Screen.xib" that has an UIImageView with size classes and
constraints set up so that it's always full screen.
I have added all splash screen images in image assets (except iPad
Portrait ones)
I use Xcode Version 7.0.1 (7A1001) and iOS 9.0.2
This issue does not happen on an iPad
The wrong splash screen looks like this on iPhone 5s:
This is made in portrait mode, so there are white squares on top and on bottom of this "black square".
I was struggling with this issue yesterday but I managed to fix it by renaming my launch screen to "LaunchScreen.xib" (without the space). But this morning the issue re-appeared.
Things I've tried:
Removing and creating LaunchScreen.xib again with and without space
Creating LaunchScreen.storyboard file instead of xib
Adding #2x and #3x versions of image used in LaunchScreen.xib
Removing/adding/replacing images in image assets
Cleaning, build cleaning and even deleted derived data
Restarting device, reinstalling app, relaunching without building and many other solutions that I could think of.
Nothing helped, so maybe someone fixed a similar issue already and can lead me to the right direction.
EDIT 1
So I renamed my LaunchScreen.xib image used from "Default.png" to "DefaultSplash.png". This instantly fixed all issues on iPhone. But now I have a new problem - iPad splashscreen is now black. If I set the LaunchScreen image to some other image used in project, the Ipad displays it as splashscreen without any problems, but neither Default.png nor DefaultSplash.png can be used on ipad now. This is really weird issue.

In my case the images in the "Launch Screen.xib" weren't displaying. I had to rename them and reset the new names in the nib file to make it work.

So I fixed the issue like this:
Since I renamed the file LaunchScreen.xib, it fixed an issue on iPhone but caused a similar problem on iPad. Since then, I cannot use the same image file name for the same xib (i.e. if image "Default.png" failed, it cannot be used anyomre... Bug?). So I created two files, LaunchScreen.xib and LaunchScreen~iphone.xib with separate image files for each. Now it works okay.
Seems ugly and buggy but it works.

There is a change in Xcode7 iOS 9 onwards. They have modified Launchscreen(Black screen we will get).If you change deployment target means you can see the previous launch screen. Only empty view controller is present so we have make changes on it.
As per requirement in assets add images in imagecassets.

It may sound stupid but something related to this scenario may happen:
If you hook any outlet and then break it by changing the custom class you will get this black screen behavior without any warning, instead of the typical crash from any non launch storyboard/scenes this will lead to a black screen before the app start.

Related

Launch Screen not working on iOS 14 with Xcode 12

I am very frustrated now. I upgraded Xcode to version 12 and tested my app on iOS 14. Now the problem is, that my launch screen is just showing in black. I tested it with an iOS 13.5 device and it is still working as expected. I tried to remove the launchscreen.storyboard approach and added the Launch Screen key in the info.plist, but then the image is scaled to full size.
Now I tested a little bit with the launchscreen.storyboard and I found a few things.
If I remove the Image view, the launch screen is showing as expected. I added just a label and that would work.
If I use an image from the system in the image view, it is working as well. It is just not working when I am using an image from the project.
Did you experience issues with iOS 14 and the storyboard approach?
If yes, how did you fix it?
A work around that seems to be working for me:
For a strange reason if I am downsizing the image then it is working fine. I had a full size image of dimension 2732x2732 and it didn't work. Reducing the dimension of the same image to 2400x2400 is working fine. I have tried with 2500x2500 and 2600x2600 but none worked.
Most importantly, every time I change the image I had to restart the simulator to reflect the updated image.
It didn't work on the real device yet. Like the simulator, I had to restart the device and then only it worked.
Not sure if it is something with the dimension/size of the image or with the reboot.
Further updates:
I uploaded the same build (with smaller image) to TestFlight and installed it on my device (basically updated from the previous version having large size image) and unfortunately the issue persisted :(
Now what I did is uninstalled the app and reinstalled it again from TestFlight. Issue still persisted.
Finally I had to delete the app, reboot my device and install the app again. This is when it worked fine.
So here are a lot of good ideas, but I was able to finally solve the issue - it is more like a workaround. I needed to store the picture outside the Images.xcassets folder and then it started to work again. This is a very weird issue.
A workaround is to use a button with an image instead of an imageview in the launch storyboard. It works like a charm!!
One reason might be the size of the images. Since iOS 14 images for launch screen are limited to 25 MB as stated in Apples Human Interface Guidelines.
An image with 2.400x2.400 pixel will result in a memory size about 22 MB. With 2.500x2.500 we reach the 25 MB.
We had the same problem where the full screen image in LaunchScreen.storyboard was black on all #3x devices like iPhone 12. Reducing the size of only the #3x launch image from 3.072x3.072 to 2.400x2.400 solved this problem.
A square image is the easy way to support landscape and portrait orientation. But it should also work to have different images for each orientation, where one image in total is less than 25 MB.
Had the same problem. The issue was the .png image used in the launch screen storyboard. This lead to the whole launch screen just being black.
What fixed it in our case was:
Choose a smaller image
Delete App from device/simulator
Restart device/simulator
I found that the image was the source of error by replacing the image with an other one in our app. It immediately worked with a different image (no restarting or else required).
The only workaround that works for me was to add the images outside Images.xcassets folder. After modified this and rebuild the app, it worked expected.
Some issue it's happening on the iOS 14 or XCode 12.
I encountered this problem
when using LaunchScreen.storyboard and used the image on Assets.xcassets, not working on iOS 14 with Xcode 12.
I solved it by try put change 3x image 2436×1125,and set 2x image 828×1792.
Finally I had to delete the app, reboot my device and install the app again. This is when it worked fine.
I had this, too. Pretty infuriating. My launch screen is merely a background image (2048x2048 PNG) and a graphic (2048x2048 PNG) in the middle.
The fix for me was to have a smaller middle graphic (720x720 PNG), remove the images from any assets catalogs, and add them into the project.
The images didn't show on the Simulator until I restarted it. When built and installed to my iPhone, I didn't have to restart it.
In my case, the ViewController property, "Is Initial View Controller" was not checked. Also, be sure to set the color of the view to an actual color and not a system color, otherwise you can run into issues with the device theme settings. That is, if you like to show a specific color.
Also, to access that setting make sure you click on the actual View Controller object in the drop down panel.
The only thing that worked for me was:
Delete the existing LaunchScreen.storyboard & create a new one
Check " Use as Launch Screen "
Check " Is Initial View Controller "
Make sure the image your using is NOT located under Assets.xcassets folder. I put my image in the root of the project
Delete the app, restart the simulator, and run the application
BINGO!!!
I have a similar issue with XCode12 / iOS14 and React project:
The launchscreen.storyboard was working fine in previous versions. Since update to XCode12 it shows as following:
Lauching into a black screen (2-3 seconds)
Then showing the Launchscreen correctly
If I try to use the new "Launch Screen" dictionary in Info.plist I have the follwing issues (same in another Xamarin App):
Image is zoomed in / not showing completely
Background color setting is completely ignored (tried RGB and Color.xcasset)
This is just completely bugged since Xcode 12 !
So I've had this bugged with Apple via their feedback system since June 26th 2020 - FB7795777.
I've provided my project and many diagnostic reports and they've never come back with a fix.
However, today, I fixed it.
Basically, there has been some change in the iOS/iPadOS SDK about how it's support .PNG and .JPG files (size or dimensions are the problems I think) in the Launch screen process.
The solution:
Open your .PNG file in Photoshop and re-export it with the 'Smaller File - 8-bit' option checked. It shrunk it down to less than half the size, and it worked first time.
In my case following did the job:-
Remove Launch screen file from Project -> General -> App Icons and Launch Imagees -> Launch screen file.
Go to info.plist file and open as source code.
Add following code there and change the image name:-
<key>UILaunchScreen</key> <dict> <key>UIImageName</key> <string>splash(This is your image name)</string> </dict>
In iOS 14 this new key was released (UILaunchScreen). So take care from next time. If you get error then check info.plist file.
Happy coding :)
That worked for me was:
Put xxx.pdf image into Assets.xcassets and set "scale" to Single Scale
In Launch Screen.storyboard, set the imageView's image is xxx, then set imageView's width, height, centerX and Bottom to View
Then worked for me
Xcode 12.5.1, iPhone 7 Plus, iOS 14.6
In my own case , I solved the problem in these few steps:
Image must be 1024px, then
Add to assets
-> A workaround in case you have a much bigger image, use these simple steps:
Generate your app icon
Go to the app icon folder
Copy the 1024 px of that image andappicon image
Then add to assets.
Both methods works perfectly.
This may help others so I am adding it here.
I use Cordova for my hybrid app, and then I load my image assets that are generated by Asset Catalog Creator (which is a great little product).
This was working perfectly until I updated to Xcode 12 and tried to run it under iOS 14.
What I discovered is that Cordova was adding a "CDVLaunchScreen.storyboard", and they had a "LaunchStoryboard.imageset" (directory) in their asset catalog, which contained just a contents.json file.
I simply copied this into my asset catalog, and when I drag and drop this into my updated project (newly generated each time by Cordova), my Launch Image displays again.
Don't ask my how or why Xcode magically wires this stuff together, but it worked for me.
I can pass along the contents.json that worked with my asset catalog if it will help.
BTW, my General settings screen does NOT have a Launch Screen File selected, but Xcode seems to find the required files.
I've got yet another potential solution to this, as none of the existing solutions worked for me.
I use PDF vectors in my Asset file, and this normally works great. But it turns out that it doesn't work on the launch screen - it just shows skips the launch screen entirely if it contains a PDF image.
Swapped it for a large PNG, problem solved.
What worked for me:
Use smaller images like #Darkpaw suggested. Launch storyboards are, after all, intended to be indicative of the coming UI, not artwork based.
Use PNG image (not PDF) and don't put it in an assets catalog like suggested by #Sylber
Just noting separately as I had black/broken launch mages until I did BOTH steps.
You might be seeing this issue if your #1x, #2x, #3x images are blank in your image xcassets folder.
Make sure you have images for each.
You can also select your 1 image, and set Scales as "Single Scale" in the Attributes inspector (on the right hand side)
In Xcode 13 launch screen was not displaying rather a black screen was coming.
But this worked for me Project -> General -> App Icons and Launch Images -> Launch screen file -> change Main to Launchscreen.
Most answers mentioned here are workarounds, the issue i noticed is that when you modify the launch screen assets, do check the item file name too.
Assets -> Show in folder
Then check the launchscreen items folder and make sure that the item inside the folder has the same name as folder.
To expand on Thorsten Stark's answer above...
Since iOS 14 images for launch screen are limited to 25 MB
For me it appeared to be an accumulated size of assets on my Launch Screen storyboard file. When I removed a number of them I no longer saw the black screen.
I ended up just using one image 2778 x 1284 which was 600kb in size. This solved the problem.
To further test, I duplicated the image to make 3 copies on my Launch Screen storyboard file, and sure enough, black screen again.
The best solution to me in 2022...
reduce sizes of your images, in my case:
splash.png (256x256)
splash#x2.png (512x512)
splash#x3.png (768x768)
only doing this and put them in Resources folder then reference in
ImageView work like charm....
alternative:
use Button in place of ImageView works too

App compiled with Xcode 6 runs on iPhone 5s top/bottom of screen blank

Recently we switched to Xcode 6, and I am having this issue: my simplest tabbed app compiled with Xcode 6 occupies just part of the screen, when it runs on iPhone 5s. There are two black strips sitting at the top and bottom of the screen. Like below:
By default, it looks that way (that is, I created the project using Xcode's template, and compiled and ran it without any modifications). I have also tinkered with various project setting bits, but in vain. Tried creating the project in both Swift and OC, both had the same issue. Never had this problem in Xcode 5.
Can anyone tell what's going on here?
Thanks.
Set up launch images in your app. It is mandatory now for ios 9. Refer this https://stackoverflow.com/a/18913189/3051458
This happens when you dont have the right image assets in your project.
Correctly again drag drop the correct image assets in your project (check the splash images) and it will work.
Dont know why this happened but I suffered from this too ones and then saw the splash images got deleted.

iOS 9 Splash screen is black

My apps' splash screens are all plain black after upgrading to iOS9.
Does anybody know why this is? Some of them are using a .xib splash screen and some are using images, but they're all just black now. Does an app have to be built with Xcode 7 for the splash screen to work in iOS9? Has anyone seen some documentation on whether this is an intended breaking change from Apple?
Thank you!
UPDATE: Looking through the apps again it seems my older apps, which only had a Launch image and no .xib are still displaying correctly, so the issue seems related to the launch screen .xib
UPDATE2:
As hagi pointed out in the comment, after re-installing the very same binary it starts working again so the cause is probably that launch images are generated from the xib whenever the app is installed, and stored somewhere, and then when upgrading to iOS9, for some reason (unintended Apple bug most likely), the generated images are cleared, and the app ends up with no splash. And that's why the old-fashioned launch images are still safe and not affected by this, cause they're already baked into the app.
I'll report it as a bug to Apple.
Easy fix. No need to mess with anything. Xcode 7 just prefers the images to be "Universal".
Click on Assets.xcassets folder
Click the + sign to Import from Project.
Select all images
Done. Now your launch screen works and Xcode is happier.
Same problem here after I updated to iOS 9. Re-installing the app from the App Store seems to solve the problem. I guess, it's an iOS 9 glitch.
I had the exact problem and had a black launch screen after using Xcode 7, and at first re-adding the images in Launch-Screen.xib worked but it went black again.
I fixed this permanently by moving the images referenced by Launch-Screen.xib into an asset catalog, rather than using the png filenames.
Just to point out that once again (as this solution didn't appear in answers, and I've personally lost around two hours when "fixing" that), sometimes, especially when the app is in active development/debugging, it requires iOS device to reboot for the launch screen to be fixed.
Black screen default come because, iOS strictly enforces some a startup images it can be black or any images.
Use UILaunchImages key to the Info.plist file and use a dictionary to describe each launch image.
check following references
A launch storyboard or xib must be provided unless the app requires full screen
I am using xcode7.1 it works. Please download latest xcode7.1
I hope above information will help you.
In the storyboard 'Clears Graphics Context' box unchecked then It works.
What worked for me was
1 - Go to LaunchScreen.storyboard
2 - Select is the initial view controller
enter image description here
And you are good to go.
With me uninstalling the app, or rebooting the device didn't help. I used XCode for 5 more minutes, which is the mean time between failure in XCode and it gave "Unkown error occurred" error, which was very helpful. Of course as an experienced XCode developer I knew what to do, force-quit, clean the project, rebuild.
The first error was solved meanwhile as I had forgotten about that.
The problem maybe because missing image size: .png, #2x.png, #3x.png at LaunchScreen.xib
I made loading screen by LaunchScreen.xib
In this xib has load a image launch.png
But there are missing size launch.png, just exist launch#2x.png and launch#3x.png
After add missing image: launch.png, black square bug is gone.
Starting from iOS9 and Xcode 7 you are required to provide a LaunchScreen.storyboard for your launch screen in order to support the new multitasking feature on iPad.
To opt out of being eligible to participate in Slide Over and Split View, add the UIRequiresFullScreen key to your Xcode project’s Info.plist file and apply the Boolean value YES.
I have fixed this issue after removed Size Classes for LaunchScreen.xib
I used only Auto Layout for it.
I noticed the same issue on the launch screen and have a black square in the middle of the screen.
It might be due to missing images at the specified formats .e.g #2x, #3x etc.
I had the same problem. I downloaded Xcode 7 and upgraded my project to swift 2.0. After recompiling the issue was gone at first but then it started to happen again later on during my tests on other unrelated code.
So far two things get this fixed, in both cases temporarily. Remove the background image, add the same image with another name. New image works for a while. Second, is you resize the image view, and in most cases the image starts to work again, but only for a while.
I submitted my new update to iTunes connect while I was seeing the splash screen. Not sure if this is an operating system issue or app api issue that gets corrected with a recompilation of code.
I also tried enabling and disabling the new Bitcode feature but that didn't help.
I had the same issue with the new iOS 9 project I built using Unity (5.2). To fix that I added the image that I want to show as the launch image to the LaunchScreen-iPad.xib file's Image view.
The common solution of adding the Images in LaunchImage and setting it in Launch Image Source and deleting the entry in Launch Screen File did not solve my issue. The launch image is dependent on the iPhone you are using. Since my app was for iOS 8.0 and greater, choosing it in LaunchImage will ask you to upload only Retine 4.5" and Retina 5.5" images. But these sizes will work for iPhone 6 and 6 Plus. You should upload the images based on the device.
iPhone 4S:640 x 960 (#2x)
iPhone 5:640 x 1136 (#2x)
iPhone 6: 750 x 1334 (#2x) portrait, 1334 x 750 (#2x) landscape
iPhone 6 Plus: 1242 x 2208 (#3x) portrait, 2208 x 1242 (#3x) landscape
I wasted so much time solving the black screen launchimage issue. Hope this helps someone.
We always need to add proper size of image if we are using image.Assets for Launch image and select correct options for launch image Source on Clicking project navigator>General>AppICons and launch images > launch image Source > BrandAssets
If size of launch image is not correct with respect to device on which you are try to running app, then your app will run as iPhone 4 showing black top and bottom bars.
Resizing the image and changing the format to png fixed it for me :
Resize the images (1x => 500 × 825) (2x&3x => 600 × 991)
Change to png
Clean building folder and Derived Data
Restart xcode and simulator

UIImageView missing images in Launch Screen on device

I have an app that supports iOS8 and later, built in Xcode 7 and I am using a XIB for a Launch Screen (I do not have launch images). The view contains a single UILabel with the app version, and 2 UIImageViews with images that are both present in Images.xcassets: A logo and a splash image.
The UILabel and the logo image appear correctly when I launch the application, but the splash image does not if I run the app on an iPad Air 2 with iOS9. I have tested on an Air and a Mini running iOS8, and iOS9 simulators for iPad 2, iPad Air, and iPad Air 2 and the image appears correctly in all of those.
I ran some basic troubleshooting to see if I could figure out what is going on but I haven't been able to solve it and the only difference I can see between the image that's working and the one that's failing is when I added it to the assets...
Here's a rundown of what I know:
The UIImageView for the splash image is in the correct place, at the correct size. I can tell this because I set its background color to green just to make sure. The view is there, but the image does not appear. So I'm assuming that the view is not to blame.
Setting the UIImageView for the splash image to also use the logo image makes the logo image appear in the correct place for the view. This also leads me to assume that the view is not to blame.
The UIImage that I am using in the splash image view is used elsewhere in the app and appears fine in those other views (the logo image is also used elsewhere in the app and appears fine). So I'm assuming that the image is valid and having it appear in other views is not a problem.
I've confirmed that the settings of the UIImages for the logo and splash in the xcassets file are the same. They are set to Universal, Any width and height, multiple scale factors, rendered as default. There is one difference - the logo has 1x, 2x and 3x scales while the splash image only has 1x and 2x, but I have also tried using UIImages with only 1x, and 1x and 2x values in the UIView and they work (if they were added to the project some time ago).
Adding another image of a different size or format (PNG and JPG) to my xcassets and using that UIImage in the UIImageView for the splash image also fails to display.
Adding another UIImageView to the XIB file and allocating it a UIImage that was already in the xcassets works, the image appears in the loading screen.
Copying and renaming the image files used for the logo and adding them to the project then using that UIImage in the splash view also fails to display.
I have tried cleaning the project, restarting the development machine, and deleting the app from the Air 2 and reinstalling it just in case that was a problem.
These last three steps lead me to believe that there's some issue with images added after a certain point in the project file's lifetime. While I updated to Xcode 7 yesterday, the splash image was originally added in Xcode 6, but the logo image (also added in Xcode 6) was added some months before.
I've looked over the json files for the logo image and splash image and they appear to have the same format. I've also trawled through the pbxproj file looking for differences and I can't see any.
So I was wondering if anyone had any idea why the launch screen might not display these new images I'm adding on the Air 2 specifically? Other questions I've been reading through relating to images not appearing all seem to relate either to Launch Images, or to images in XIB files that have associated classes, neither of which seems relevant here.
Turn it off and then on again.
Seriously, restart the device — that’s what fixed it for me.
Here’s what didn’t work:
Cleaning DerivedData.
Cleaning the project.
Uninstalling the app from the device.
Restarting Xcode.
Restarting the computer.
Older observations:
Just like the others, it:
Works fine in the Simulator
Used to work on the devices (iPhone 5S, iPad Air)
No code changes (verified via git reset --hard HEAD), yet stopped working.
What I remember triggering the first build where it stopped working was unplugging the iPhone while it was runnning. (Not sure if it’s related.)
However, the git reset not fixing it (combined with all the clean steps not working) tells me it this must be getting cached somewhere else. Quite possibly in one of the .gitignored files? (I’m using Git ignore file for Xcode projects)
One workaround that worked for one UIImageView (in the UIView that has three) but not for the others was putting the image into an .xcassets file. Reverting to the plain image file did not undo the fix. (Really feels like a caching error.)
UPDATE: See top — restarting the device is what fixed it. I get the feeling the wrong bitmap data is being cached on the device itself.
Radar: http://openradar.appspot.com/23534818
"The solution for me was simply to make sure that the "Clears Graphics Context" box is unchecked for the UIImageView in the storyboard. Just changing this fixed it for me."
No other solutions worked for me.
Got it from apple developer forum
I had exactly the same issue on an iPhone 6.
The very strange fact is that I was able to use another image from my images.xcassets which had the same size, compression, color space ...
I'm not able to find why it doesn't work but I found a solution :
Simply put your file outside your images.xcassets and use its full name (with extension) in Interface Builder
Hope this help !
The following sequence of operations fixed the issue for me on Xcode 7.3.1 and iOS 9.3.4:
Clean Your Build (⌘+⇧+K)
Close Xcode
Hard Reset iOS Device (Power + Home Button reboot)
Relaunch Xcode - let indexing finish and build on device once it is ready.
Many other answers suggest rebooting devices and / or rebuilding and / or reinstalling is the solution.
While these answers work for some of us, the reason these work is because the app is forced to "retake" or "rebuild" cached snapshots.
Cached snapshots are used by apps to present images before supporting data is loaded into memory, including the asset catalogue that contains storyboard images.
This SO answer by #jaga provides the solution, but not the reason, as to why UIImageViews are missing in the Launch Screen on device (but not in the simulator).
Background
Recently I attempted to use a custom font in my "Launch Screen.storyboard" file.
The reason I could not became clear after reading this SO answer by #TimCamber, which prompted me to do a little more research and testing.
The reason that a custom font is not included in my Launch Screen Storyboard file is the same reason an image within an asset catalogue is not included...
The app prepares portrait & landscape snapshots of the app's Launch Screen from your Launch Screen Storyboard file and (currently) saves it in your app bundle here:
/Library/Caches/Snapshots/<<app_bundle>>/ and
/Library/Caches/Snapshots/<<app_bundle>>/downscaled/.
This process is complete before any supporting files are loaded, including any custom fonts and the asset catalogue.
Solution
As mentioned above by following #jaga's solution, literally all that is required is to:
(old school) add an image file (.PNG) to your app's bundle (as you can see from the screenshot below I added the image file under the Supporting Files subdirectory in an Images subdirectory), and
reference that image in your UIImageView object in the Launch
Screen Storyboard file...
I was seeing the same problem. Rebooting the device (iPhone 6) and rebuilding the app to the device is the only thing that fixed it. I tried many other tips and suggestions but nothing else worked. Only reboot + rebuild helped.
My solution #iOS 11.x:
Use .jpg image instead of .png. I think image file size matters;
(Optionally) Put image file in project directory rather than .xcassets;
I had the same for app installed from TestFlight.
Delete app -> then restart iPhone -> then reinstall app works for me.
Just reinstall app or just restarting device didn't help.
What worked for me was to select Reset Content and Settings... from the Simulator menu
I was having the same problem, but restarting the device didn't help. What worked for me was deleting the UIImageView from my launch storyboard and adding a new one.
Have you tried turning the device off and on again? Do it.
Bring images out of Image.xcassets and add them again to project. It worked for me.
Remove app from mobile and then restart mobile and install app again. now the issues will be solved
I also had this exact problem in Xcode 7 with iPad and iPhone devices. Although it makes no sense, I was able to get around it most of the time by setting not only the Image but also the Highlighted image in the image view to the same image in my images.xcassets.
I use the iPhone 5s device, also meet this problem.
I fix it by :
Remove Drive Data
Clean the project
Restart Xcode
Remove the project from my device
Restart the 5s.
I think it's something wrong of Xcode to use memory, system may be allocate a little memory for Xcode cause Xcode drawing the lunch image failed (On my computer , Xcode have runned for several weeks without close)
it's worked for me.
First in xcode clean de project.
If you use the simulator, delete app and relaunch.
If you use a device, delete app and restart the device.
I think launchscreen only support image in Assets.xcassets.
Restarting Xcode did it for me.
What did not do it:
Clean build folder
Restart device or simulator (image wasn't visible on either)
Select the ImageView and then remove the image extension (.png or .jpg) in the attributes inspector tab > Image view > Image > Image Name.
On launchscreen.storyboard the image will not appear but it will be there in device. This worked for me.
It seemed a bug of iOS. Like sometimes the system animation disappeared.
Now I just reboot the iPhone and it is worked for me.
In my case I it was the image name.
I added an image named Default-568h#2x.png to LaunchScreen.xib - one of my old launch screens just for testing purposes. I was building on the iPhone X Simulator, the image didn't show up.
Changing the name to something neutral (MyImage.png) solved the issue.
It seems that the #2x was part of the problem as well as the -568h.
Which makes some sense on a -812h#3x device.
I have the same issue with imageView a launch screen storyboard. I removed reference of picture from project, I renamed my image and added it again to project. All works perfectly.
Also can 1. delete project image 2. change image name 3. add file image to project
It worked for me.
I had this problem in iOS 10 on an iPhone 6 and also in the Simulator. My image was in a folder and that seemed to be the issue. I removed the image from the folder in Xcode and put it in the project's base directory which solved the problem.
I experience the same. I change image resolution from 300 pixels/inch, change it to 72. It works for me.
Next helped to me:
change "Launch Screen File" to another xib
run the app
change xib back
Also very important: check that your is xib not opened in another tab, that can cause it as well!
I found a simple but radical solution that worked for me :
1 - Delete the file : LaunchScreen.storyboard and move it to trash.
2 - Product -> Clean
3 - Create a new launch screen file named : LaunchScreen.storyboard and put your images in it
4 - Save and build
That worked for me after trying complex methods for hours... It seems that my LaunchScreen.storyboard was write-locked and couldn't be saved or a weird caching process was blocking it.
This is too important
Must be empty! Launch Screen File
Image name is the problem.
Rename the image name used inside the Launch screen storyboard.
Make sure not to use any character other than alphanumeric ( don't use "_-&#")
Worked for me like a charm..
SOLVED!
The only thing that worked for me was deleting the ViewController from LaunchScreen.storyboard and create a new ViewController set to
Is Initial View Controller
Simple as that :)

iPhone 6 - app does not fill screen

Most of my apps scale up when run on an iPhone 6, but for some reason one of my apps looks like this:
What would cause it to not just scale up and fill the screen?
EDIT: Here are some repro steps:
Create a new project (Single View). Turn off size classes and just use iPhone.
Make the background orange.
Add a yellow UIView subview at (20,20,280,200).
In Xcode you get this:
Now simulate on iPhone 6. You get this:
Why doesn't it just scale up and look normal?
Not sure why this is getting downvoted. It's a legitimate question. And here's the legitimate answer:
Remove the "Launch Screen File" in Projects > General. Xcode 5 did not have this so older apps scale up automatically. Apps created with Xcode 6 get a default Launch Screen file created.
Removing it will make your app scale up on iPhone 6.
I have got the same problem and I managed to solve it by adding constraints to my ViewController in the storyboard.
Make sure that you clicked the ViewController of your scene. They yellow button in the this screenshot.
Click Editor-> Resolve Auto Layout issues -> Add Missing Constraints
Now you will find that the background image is scaled up to fill iPhone 6 or iPhone 6 plus.
Note that this solution works for me even if I did not provide any launch screen file.
I had the same issue. Searching for an answer, most of them mention the launch image. To me, what did the trick, was that I first enabled launch image for iOS8.0 and later in Xcode, which requires the native resolution sizes for 4.7" and 5.5". Adding these sizes didn't help, but when I re-disabled them, it started working!
If you do have any launch image, you will need launch images for all appropriate sizes. I was doing a minor update to an app, and it was not showing correctly on the iPhone 6 simulator. I created four launch images (.png files). Since the app should still run on iOS 7, I apparently could not use an asset catalog. I gave the images the correct names, and all is good.
Image sizes and names may be found here:
Sizes and Naming of Launch Image for iPhone app in iOS8

Resources