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/ .
-
1not in Images.xcassets– lauren1573Sep 20, 2017 at 15:42
-
iPhone-X Default-812h@3x.png not used as splash screen stackoverflow.com/questions/46378187/…– iPhoneProcessorSep 23, 2017 at 15:00
-
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>– lauren1573Sep 26, 2017 at 3:24
5 Answers
You can add static launch image for iPhone X, only add: Default-375w-812h@3x.png
-
1This should be the right answer. Just add a 1125x2436 image with the name Default-375w-812h@3x.png and the iPhone X version of the app will launch.– tomDevNov 27, 2017 at 12:46
-
1This should be the selected correct answer, adding Default-375w-812h@3x.png works.– IulianDec 8, 2017 at 9:45
-
1Previously I had "Default-812h@3x.png" and it not worked, changed the name to Default-375w-812h@3x.png and worked, this is the right answer. Feb 22, 2018 at 13:19
-
1Could you tell me what's the landscape dimension naming convention for iPhone X ?– KenshinFeb 12, 2019 at 13:56
Following the convention it should be named Default-812h@3x.png
(and Default-Landscape-812h@3x.png
) (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.
-
1What 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.– EricSSep 23, 2017 at 1:53
-
... 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). Sep 23, 2017 at 3:06
-
1@ValentinShergin I used Default-812h@3x.png image size 1125x2436 but its still using Default-568h@2x.png in iPhone X splash...Cocos2d-x project...your answer not worked. Sep 23, 2017 at 4:03
-
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? Sep 23, 2017 at 4:32
-
And if your app supports landscape mode, you also probably have to add
Default-Landscape-812h@3x.png
. Sep 23, 2017 at 5:15
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.
If the launchImage source name is 'LaunchImage'.
The name should be
[UIImage imageNamed:@"LaunchImage-1100-2436h@3x.png"]
PS: how to find it ?
- step 1. Open the bundle directory like
/Users/hite/Library/Developer/CoreSimulator/Devices/5CFE3CFA-94F8-45EC-BAC5-xxx2/
- Find your application file like
myFit.app
, andShow Package Contents
. - search for the 3x.png to get the image name.
-
2Following this method, the iPhone X’s launch image for portrait orientation is "LaunchImage-1100-Portrait-2436h@3x.png”. Nov 16, 2017 at 1:05
-
1. You can find your Simulator app file path by print
[NSBundle mainBundle]
; 2. Open your app withShow Package Contents
, but notunzip
Dec 7, 2017 at 3:44
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.
-
-
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>
Dec 7, 2017 at 9:35