10

I am testing image launch-screens on the iPhone X and ran into a strange behavior. So I'd like to request some feedback before opening a radar:

I created a portrait and landscape launch-screen with the dimensions 1125 x 2436 Pixel (portrait) and 2436 x 1125 Pixel (landscape). Then I add them to the asset catalog and they are picked up correctly: iPhone X asset catalog

So far so good. Then I run the app on the iPhone X Simulator (I've reset the app before to ensure nothing is cached) and the (stretched) landscape-image is shown.

iPhone X Portrait

I validated the png sources to have a valid non-alpha background and am still unable to show the correct launch-screen. I noticed that the portrait image is not even copied to the resulting product:

enter image description here

So that might suggest an issue with Xcode 9. Any feedback is more than welcome, thanks guys!

EDIT: Side-note: When removing the landscape image from the asset-catalog, the portrait one is copied and picked up correctly.

UPDATE 09/29/2017: Apple confirmed that it is indeed an issue in Xcode and it will be given to the related engineering-team.

Hans Knöchel
  • 11,422
  • 8
  • 28
  • 49
  • I have the same bug, and if you use simulator and make a rotation so you can see that microphone rotate too !! What about safe area displayed at bottom in this case !? Bug ? – Beber Sep 27 '17 at 21:06
  • 2
    __"Apple confirmed that it is indeed an issue in Xcode and it will be given to the related engineering-team."__ glad to c this update. – Kjuly Oct 12 '17 at 12:40

4 Answers4

3

For the iPhone X, try using a launch screen storyboard instead of launch images.

This is mentioned in the new "Building Apps for iPhone X" video on Apple's developer site: https://developer.apple.com/videos/play/fall2017/201/

(It's mentioned at the 2:50 mark.)


To set a launch screen storyboard, create a storyboard file and choose it from the "Launch Screen File" dropdown in your project settings.

Xcode Screenshot

nathangitter
  • 9,607
  • 3
  • 33
  • 42
  • Not sure if it's true or they changed their mind, because otherwise they would not provide the option to use image launch-screens. – Hans Knöchel Sep 17 '17 at 15:52
  • The software for iPhone X is still going to undergo changes before its release later this year. The video I linked is the most official and up-to-date resource I could find related to your problem. Did using a launch storyboard work for you? – nathangitter Sep 17 '17 at 18:04
  • Yeah, storyboards work fine. But in my case, it has to generally work for both - complicated reason :-). If it's relevant for you, duplicate https://openradar.appspot.com/radar?id=6124283306704896 to raise attention. I'm awaiting feedback from Apple this week. – Hans Knöchel Sep 17 '17 at 20:38
  • 1
    When you create a new LaunchImage set, yon can see new iPhoneX options for adding LaunchImage. So you dont must use storyboard (but maybe this option is better ...?) – Beber Sep 27 '17 at 15:27
  • 1
    @Beber In the video from Apple linked in my answer above, they specifically mention adding a launch storyboard to ensure your app works on iPhone X. – nathangitter Sep 27 '17 at 15:52
  • @nathan maybe it's better way as i say but in my side I will try to publish with this other way. I can make return about this publish; but this will be in few week. – Beber Sep 27 '17 at 21:00
  • @Beber - when you say "When you create a new LaunchImage set, you can see new iPhoneX options for adding LaunchImage." - what are the steps to take to see this option? I do not see any options for iPhone X. – Joe Oct 03 '17 at 19:31
3

This is finally fixed in Xcode 9.1 Beta 2 and above!

Hans Knöchel
  • 11,422
  • 8
  • 28
  • 49
1

Using only the portrait image (and no landscape one) seems to work, at least on the simulator. Anyhow, iPhone X can launch apps only from portrait. Don't know if this solution will create issues on the actual device (iPhone X isn't available yet at time of this writing). I would guess it doesn't.

Tim
  • 11
  • 1
0

This is clearly an xCode 9 bug, i've the same problem, also the filename of the asset is not correct, following previous naming convention there must be 2 files, LaunchImage-1100-Portrait-2436h@3x.png and LaunchImage-1100-Landscape-2436h@3x.png (note why 2436h and not 812h, all the others resolution are expressed in point not pixel)

Stefano Boeri
  • 61
  • 1
  • 2