Launch Image not showing up in iOS application (using Images.xcassets)

后端 未结 13 778
南方客
南方客 2020-11-30 01:20

I\'m having some trouble getting my launch image to show up in my application.

I have created all the static image files in the Images.xcassets file in an asset set

相关标签:
13条回答
  • 2020-11-30 01:50

    I just figured this out. My launch image was not showing up, I get a white screen when launching on a device (iPhone 6, 7+) or testFlight. Fix: Renamed "Landing_screen.png" to just "Landing_screen" removing .png part. https://stackoverflow.com/a/43592662/3445278

    0 讨论(0)
  • 2020-11-30 01:52

    Solved! I've tried a lot. The problem was that the launch image shows in simulator and didn't show in real device. I got a Storyboard with UIImageView in it. Strange was that old images worked, and images, that i did add recently not. First i thought that this is a problem with assets. No. Than i checked color profiles and did a lot of tries with different profiles: left-working image, right-not working. Didn't help.

    Then i started google and found this thread

    Main solutions from here:

    1) Didn't helped for me.

    Change image property of my launch image using Preview app: [ Tools --> Assign Profile... --> ColorSync Profile: <> ]

    2) Helped

    Even deleting the app and re-installing from XCode doesn't work. However, changing the bundle ID does work. With no other changes, the existing bundle ID shows no images, but the new bundle ID shows them all correctly. I'm doing that as a temporary work-around, since a previous post in this thread suggests that installing the builds via TestFlight doesn't encounter the problem.

    3)

    I did three things (the first two on their own didn't do it, but may have assisted the third which did work)
    1) Copied all of the images to the root directory (same location as xcode puts the images)
    2) Created a folder in Images.xcassets and put the images in there.
    3) The images in the launchScreen.xib were originally called imageName.png. This was changed to just imageName (remove the file extension.

    After the third thing the images appeared. I don't know if either of the first two steps are required, but hopefully it will help someone.

    4) Helps but old and rude

    Taking the images out of the asset catalog fixed the problem for me. I just added the @1x, @2x, and @3x image used on my launch screen to the project the old way and it seems to be working fine. Trying to confirm it through TestFlight now, but iTunes Connect isn't behaving at the moment.

    I thought this is an iPhone cash problem. So you don't need to warn about it thus the image will show when installing with testFlight. After this conclusion i did next and that worked:

    1) Uninstall app
    2) Reboot phone
    3) Build app to the phone

    0 讨论(0)
  • 2020-11-30 01:53

    I had this problem. I tested on simulator. I left the "Launch screen file" blank and removed the line about the "launch screen file" inside the plist. I restarted Xcode. Nothing. In my case in was not black it was white. Xcode 7 target ios 9.

    i read this one as well: Launch Image does not show up in my iOS App

    The launch image only showed up when i deleted the app from the simulator and run the app again.

    0 讨论(0)
  • 2020-11-30 01:53

    I had this problem in XCode 9.4.1, turned out to be caused by the assets folder not being included in the Bundle Resources. Select the project, then your target. Go to 'Build Phases' and open up 'Copy Bundle Resources'. If the .xcassets group you want to use isn't listed then just drag it in from the file browser.

    Worked for me...

    0 讨论(0)
  • 2020-11-30 01:54

    After few hours of unclear answers:
    1) go to setting app General section in xCode.
    2) Scroll down to App Icons and Launch Images.
    3) Clear Launch Screen File (just leave it blank)
    4) Set Launch Images Source to LaunchImage (remember to create them in Assets.xcassets)
    Now app will use images You set in LaunchImage.

    0 讨论(0)
  • 2020-11-30 01:56

    Had a similar issue today. Tried to let xCode create automatically the Asset, but it was always unassigned.

    The solution was to create manually the Launch Image in the ImageAsset and assign the files for his respective resolution.

    It looks like xCode created a different type of Launch Image asset, so it didn't recognized the asset (v8.3.2)

    0 讨论(0)
提交回复
热议问题