question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add iPhone XR & iPhone XS Max splashscreens

See original GitHub issue

Bug 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:closed
  • Created 4 years ago
  • Comments:12 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
mobidev111commented, Oct 3, 2019

I know about the legacy status & the better storyboard method.

I’d like consistency in the cordova-ios code base. So either:

  • add the up-to-date set of images - for people still using it OR
  • remove the managing code from the cordova-ios code / or clearly deprecate it as unmaintained
1reaction
jacobwebercommented, Mar 4, 2020

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!

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found