简体   繁体   中英

Xcode 6 Migrating to Images assets issues — Black launch screen

I updated my application to use Image Asset for App Icon and Launch Images i set both with appropriate image size according to Apple Doc. The issue that I have that for Iphone and the simulator for (4S/5/5S) the launch image/screen is always black except for Iphone 6+ but it works fine on iPad. I looked at couple of post here and nothing have worked as follow

         1) deleting the asset catalog and creating a new one      
         2) adding @2x and 3@x to each file before adding to the catalog
         3) removing and redeploying the application 

      Anyone had that issue when porting image catalog ? Im using Xcode 6  
      Targeting ios 7 and 8

Thanks Mike

       Update 1
          When disabling landscape launch screen appears normally
          something i noticed before doing, so on either the device and the simulator
          the application starts in landscape even if the device is held in portrait 
          and then it rotate to portrait. Still trying to solve that issue now

The following steps are worked for me:

  1. Add the images to the project (root directory or Resources folder) with the following nomination (I will describe them into the Portrait launchimages): Degault.png (3.5 inch), Default-567h@2x (4 inch), Default-667h@2x (iPhone 6), Default-736@2x (iPhone 6plus).
  2. Go to the target settings, App Icons And Launch Images on the General tab -> Set the Launch Image Source to not use asset catalog ('Do not use asset catalogs').
  3. Remove the LaunchImage asset from your main image asset
  4. Go to the target settings, App Icons And Launch Images on the General tab -> Set the Launch Image Source to use asset catalog
  5. The XCode 6 is going to ask you about image asset migration from the existing images. Just click to 'Migrate'.

And it worked for me for each kind of devices on iOS7, iOS8. Note: If you check the new LaunchImage asset, than you can see it is really strange. It seems to contain only a few image without the images with iPhone6 or iPhone 6plus resolution.

I found that if I go to the app target general tab and remove all device orientations, the launch image will show again (ie the black screen goes away). After running the app, I then went back to the app target general tab and restored the desired device orientation and the launch images continue to work as desired.

(My answer should be in the comment section but I can't post it there due to my reputation)

May be these are very basic steps but:

  • Have you tried doing a full clean and deleting the derived data?
  • Have you checked the General tab of your target, under App Icons and Launch Images?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM