Uploaded image for project: 'Apache Cordova'
  1. Apache Cordova
  2. CB-12952

Fall back to using configured splash screen of matching dimensions and opposite orientation when available, rather than default Cordova splash screen

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Won't Fix
    • None
    • None
    • None

    Description

      Minimal reproduction steps:

      (For the sake of brevity, the following assumes you are targeting iPhone 6, 6s, or 7, but a similar procedure can be followed to reproduce on other devices.)

      1. Set up a cordova project with the iOS platform, cordova-plugin-splashscreen, and add e.g. <splash src="res/screen/ios/Default-667h.png" width="750" height="1334"/> to your config.xml, where "res/screen/ios/Default-667h.png" is the path to your custom splash screen image with the dimensions indicated / matching your device.
      2. Launch the app on the device while the screen is in landscape orientation.

      Current Result

      Cordova's default splash screen is used.

      Expected Result

      The splash screen specified in config.xml is used, just as it would have been if the screen had been in portrait orientation when the app was launched.

      Rationale

      It is strictly preferable (and better aligned with the intent of the developer and expectations of the user) to show the same splash screen in landscape orientation that is shown in portrait orientation, even though the orientation won't match, compared to showing the default Cordova splash screen in the landscape orientation.

      It's easy for developers to not realize what the current behavior is, because 1. they only followed the plugin's documentation, which doesn't warn about this behavior clearly (even though it's totally a "gotcha"), and 2. developers didn't happen to test the splash screen in landscape mode, and so never encountered this before releasing to users. Then everyone gets an unpleasant surprise when they realize this has been happening in production.

      Any interest in adding logic to fall back to using a configured splash screen of matching dimensions and opposite orientation, when available, rather than the default Cordova splash screen?

      Impact

      I've only encountered this while testing on an iOS device and using the https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-splashscreen/#legacy-launch-images method, but it may occur on other platforms and configurations too.

      Attachments

        Activity

          People

            Unassigned Unassigned
            jab_ Joshua Bronson
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: