Add iPhone XR & iPhone XS Max splashscreens
See original GitHub issueBug Report
Problem
What is expected to happen?
iPhone XR & iPhone XS Max splashscreens do get copied over if specified in config.xml
What does actually happen?
Images don’t get copied
root cause: prepare.js doesn’t include the new splash screen dimensions
Solution
Extend prepare.js
https://github.com/apache/cordova-ios/blob/master/bin/templates/scripts/cordova/lib/prepare.js#L428
- { dest: 'Default-Landscape-2436h.png', width: 2436, height: 1125 }
+ { dest: 'Default-Landscape-2436h.png', width: 2436, height: 1125 },
+ { dest: 'Default-1792h.png', width: 828, height: 1792 },
+ { dest: 'Default-Landscape-1792h.png', width: 1792, height: 828 },
+ { dest: 'Default-2688h.png', width: 1242, height: 2688 },
+ { dest: 'Default-Landscape-2688h.png', width: 2688, height: 1242 }
Extend config.xml
+ <splash height="828" src="res/screen/ios/Default-Landscape-1792h.png" width="1792" />
+ <splash height="1792" src="res/screen/ios/Default-1792h.png" width="828" />
+ <splash height="2688" src="res/screen/ios/Default-2688h.png" width="1242" />
+ <splash height="1242" src="res/screen/ios/Default-Landscape-2688h.png" width="2688" />
In the generated project: Extend Contents.json
platforms/ios/AirSec/Images.xcassets/LaunchImage.launchimage/Contents.json
{
"orientation": "portrait",
"idiom": "iphone",
"extent": "full-screen",
"filename": "Default-2688h.png",
"minimum-system-version": "12.0",
"subtype": "2688h",
"scale": "3x"
},
{
"orientation": "landscape",
"idiom": "iphone",
"extent": "full-screen",
"filename": "Default-Landscape-2688h.png",
"minimum-system-version": "12.0",
"subtype": "2688h",
"scale": "3x"
},
{
"orientation": "portrait",
"idiom": "iphone",
"extent": "full-screen",
"filename": "Default-1792h.png",
"minimum-system-version": "12.0",
"subtype": "1792h",
"scale": "2x"
},
{
"orientation": "landscape",
"idiom": "iphone",
"extent": "full-screen",
"filename": "Default-Landscape-1792h.png",
"minimum-system-version": "12.0",
"subtype": "1792h",
"scale": "2x"
},
Checklist
- I searched for existing GitHub issues
- I updated all Cordova tooling to most recent version
- I included all the necessary information above
Issue Analytics
- State:
- Created 4 years ago
- Comments:12 (5 by maintainers)
Top Results From Across the Web
Iphone Xr Screen Template - Dribbble
Discover 1 Iphone Xr Screen Template design on Dribbble. Your resource to discover and connect with designers worldwide.
Read more >PWA Icons & iOS Splash Screens Generator - Progressier
A free tool for generating PWA icons and iOS splash screens up-to-date as of December 2022. Download all assets and meta tags today....
Read more >Adding Custom iOS Splash Screens To Your Progressive Web ...
Add the following code to the head section of your PWA to support custom splash screens for the different iOS devices. <!-- iPhone...
Read more >Personalize your iPhone Lock Screen - Apple Support (HK)
You can personalize your Lock Screen by choosing a wallpaper, customizing the colors and fonts, layering subjects of photos in front of the...
Read more >Free iPhone Xs Splash Screen Mockup PSD
For more iPhone mockups check out our Apple mockup section. If you like subscribe and receive free mockups on email. Free- ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I know about the legacy status & the better storyboard method.
I’d like consistency in the cordova-ios code base. So either:
No problem – the docs are clear that the legacy approach is going away; I just wanted to make sure the “Single-image launch screen” approach isn’t. Thanks!