I want to get a simple launch screen to show in my app, built using Xcode 6.0.1.
I have added a launch screen in two ways: As an XIB (with the default name, LaunchSc
For some reason, I had to change the asset catalog location to "relative to project" for this to work.
I had also deleted the app from my phone and reinstalled, but it was probably the "relative to project" that did it.
For me, it works when I remove LaunchScreen.xib
and change it to a storyboard file LaunchScreen.storyboard
.
For the people who are using the Asset Catalog's Launch Image
, as I learned this the hardest way, I had this scenario where I was first given a jpg
file then I asked them convert it to PNG
.
I trusted them enough that I scoured the internet first as to why the launch image wasn't showing and did every solution to no avail, then I tried putting back the old launch image and was working fine, it was there that I thought what I have is not a proper PNG
file.
TL;DR: Make sure that you are actually using a proper PNG file, not a file with a renamed extension.
I had a very strange bug. Apparently my launch image source was only set for debug configuration and not release. This resulted in my launch screen appearing when running debug configuration, but when I changed to release I just got a black screen.
I fixed this when I changed my build configuration to release the Launch Image Source button appeared and I had to choose Use Asset Catalog again.
For those who are curious, this is what my project.pbxproj looked like.
...
...
...
XXXXXXXXXXXXXXXXXXXXXXXX /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; <---THIS LINE WAS MISSING
...
...
...