Launch Image names of iPhoneX?

15,217

Solution 1

You can add static launch image for iPhone X, only add: [email protected]

Solution 2

Following the convention it should be named [email protected] (and [email protected]) (812 is the actual height in points). And looks like currently there is no way to use storyboard-powered launch screen and have pixel perfect images for both iPhone X and old plus sizes models.

Solution 3

You can add static launch image for iPhone X with old project with simple step:

1, Select Assets.xcassets select launch image folder.
2, Check "iOS 8.0 and later" in the right Attribute inspector panel.
3, An iPhone X place holder will appear, drag an image 375w812h @ 3x to it and you are done.

Solution 4

If the launchImage source name is 'LaunchImage'. setting in General Tab

The name should be [UIImage imageNamed:@"[email protected]"]

PS: how to find it ?

  1. step 1. Open the bundle directory like /Users/hite/Library/Developer/CoreSimulator/Devices/5CFE3CFA-94F8-45EC-BAC5-xxx2/
  2. Find your application file like myFit.app, and Show Package Contents .
  3. search for the 3x.png to get the image name.

Solution 5

You can define the names in your Info.plist using the UILaunchImages Key:

<key>UILaunchImages</key>
<array>
    <dict>
        <key>UILaunchImageMinimumOSVersion</key>
        <string>8.0</string>
        <key>UILaunchImageName</key>
        <string>Default-736h</string>
        <key>UILaunchImageOrientation</key>
        <string>Portrait</string>
        <key>UILaunchImageSize</key>
        <string>{414, 736}</string>
    </dict>
    <dict>
        <key>UILaunchImageMinimumOSVersion</key>
        <string>8.0</string>
        <key>UILaunchImageName</key>
        <string>Default-667h</string>
        <key>UILaunchImageOrientation</key>
        <string>Portrait</string>
        <key>UILaunchImageSize</key>
        <string>{375, 667}</string>
    </dict>
    <dict>
        <key>UILaunchImageMinimumOSVersion</key>
        <string>7.0</string>
        <key>UILaunchImageName</key>
        <string>Default</string>
        <key>UILaunchImageOrientation</key>
        <string>Portrait</string>
        <key>UILaunchImageSize</key>
        <string>{320, 480}</string>
    </dict>
    <dict>
        <key>UILaunchImageMinimumOSVersion</key>
        <string>7.0</string>
        <key>UILaunchImageName</key>
        <string>Default-568h</string>
        <key>UILaunchImageOrientation</key>
        <string>Portrait</string>
        <key>UILaunchImageSize</key>
        <string>{320, 568}</string>
    </dict>
    <dict>
        <key>UILaunchImageMinimumOSVersion</key>
        <string>8.0</string>
        <key>UILaunchImageName</key>
        <string>Default-812h</string>
        <key>UILaunchImageOrientation</key>
        <string>Portrait</string>
        <key>UILaunchImageSize</key>
        <string>{375, 812}</string>
    </dict>
</array>

Landscape images would work the same.

Share:
15,217

Related videos on Youtube

lauren1573
Author by

lauren1573

Updated on July 14, 2022

Comments

  • lauren1573
    lauren1573 almost 2 years

    A question about iPhoneX. I want put Launch Image of iPhoneX( 1125px × 2436px) in common folder. Not in LaunchImage source. What's the Launch Image names of iPhoneX? just like 'Default-iOS8-736h@3x', I can not found the name in https://developer.apple.com/ios/human-interface-guidelines/icons-and-images/launch-screen/ .

    • lauren1573
      lauren1573 almost 7 years
      not in Images.xcassets
    • iPhoneProcessor
      iPhoneProcessor almost 7 years
    • lauren1573
      lauren1573 over 6 years
      I add the image in a folder of progect which not in LaunchScreen.xib or image.xcassets. In apple's <<Guide and SImple code>>, flow the example ,I add some code in Info.plist "UILaunchImages", the 1125px × 2436px image works, and the picture name does not matter. : <dict> <key>UILaunchImageMinimumOSVersion</key> <string>11.0</string> <key>UILaunchImageName</key> <string>your iphonex name</string> <key>UILaunchImageOrientation</key> <string>Portrait</string> <key>UILaunchImageSize</key> <string>{375, 812}</string> </dict>
  • EricS
    EricS almost 7 years
    What we do is create larger images with big margins and center rather than scale them, so they look pixel perfect, but with different margins on different devices.
  • Valentin Shergin
    Valentin Shergin almost 7 years
    ... using storyboard-powered launch screen, right? So, usually it is a good idea, but it does not work for some designs, unfortunately. The problem here is that iPhone X and iPhone 6/7/8 Plus have different navigation bar design (height), so it cannot be "described" in storyboard terms because there is no way to differentiate the images (both of them has @3x suffix).
  • iPhoneProcessor
    iPhoneProcessor almost 7 years
    @ValentinShergin I used [email protected] image size 1125x2436 but its still using [email protected] in iPhone X splash...Cocos2d-x project...your answer not worked.
  • Valentin Shergin
    Valentin Shergin almost 7 years
    That is really strange. Do you compile it with Xcode 9 and with iOS 11 (using "iOS 11 SDK") support? How does the app looks like when it is running, it is running fullscreen or letterboxed?
  • Valentin Shergin
    Valentin Shergin almost 7 years
    And if your app supports landscape mode, you also probably have to add [email protected].
  • iPhoneProcessor
    iPhoneProcessor almost 7 years
    its a portrait game, still using iphone5 splash in iPhoneX
  • iPhoneProcessor
    iPhoneProcessor almost 7 years
  • iPhoneProcessor
    iPhoneProcessor almost 7 years
    Xcode project file path : Maths Game/cocos2d-x-3.15.1/Projects/Game Source/proj.ios_mac/TheFour.xcodeproj
  • yycking
    yycking over 6 years
    @iPhoneProcessor I found this problem, too. Do you have any solution?
  • DzungPV
    DzungPV over 6 years
    It still work now on Xcode 9.1 9B55, you can try to clean the the build folder
  • Reza.Ab
    Reza.Ab over 6 years
    worked !!! had to remove the launcsreen key from my .info file !!1 Thanks so much
  • Daniel Pietzsch
    Daniel Pietzsch over 6 years
    Following this method, the iPhone X’s launch image for portrait orientation is "[email protected]”.
  • Sasho
    Sasho over 6 years
    You are the master! This is exactly what I needed. Brilliant. :)
  • tomDev
    tomDev over 6 years
    This should be the right answer. Just add a 1125x2436 image with the name [email protected] and the iPhone X version of the app will launch.
  • likid1412
    likid1412 over 6 years
    1. You can find your Simulator app file path by print [NSBundle mainBundle]; 2. Open your app with Show Package Contents, but not unzip
  • PRASAD1240
    PRASAD1240 over 6 years
    after adding below tag, it is working now <dict> <key>UILaunchImageMinimumOSVersion</key> <string>8.0</string> <key>UILaunchImageName</key> <string>Default-812h</string> <key>UILaunchImageOrientation</key> <string>Portrait</string> <key>UILaunchImageSize</key> <string>{375, 812}</string> </dict>
  • Iulian
    Iulian over 6 years
    This should be the selected correct answer, adding [email protected] works.
  • Teofilo Israel Vizcaino Rodrig
    Teofilo Israel Vizcaino Rodrig over 6 years
    Previously I had "[email protected]" and it not worked, changed the name to [email protected] and worked, this is the right answer.
  • Kenshin
    Kenshin over 5 years
    Could you tell me what's the landscape dimension naming convention for iPhone X ?
  • Manish
    Manish almost 5 years
    @iPhoneProcessor for me it refers [email protected] always. Did you get solution?