Launch Image does not show up in my iOS App

前端 未结 28 1567
逝去的感伤
逝去的感伤 2020-12-02 04:11

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

相关标签:
28条回答
  • 2020-12-02 04:58

    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.

    0 讨论(0)
  • 2020-12-02 04:59

    For me, it works when I remove LaunchScreen.xib and change it to a storyboard file LaunchScreen.storyboard.

    0 讨论(0)
  • 2020-12-02 05:00

    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.

    0 讨论(0)
  • 2020-12-02 05:00

    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
    ...
    ...
    ...
    
    0 讨论(0)
提交回复
热议问题