Apache Cordova
  1. Apache Cordova
  2. CB-2436

Wrong splashscreen is displayed when UILaunchImageFile is set

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.4.0
    • Fix Version/s: 2.6.0
    • Component/s: iOS
    • Labels:
      None
    • Environment:

      iPhone 5 , iPad 3

      Description

      When apps start on the iPhone 5, iOS picks <UILaunchImageFile>-568h. When Cordova starts with AutoHideSplashScreen set to false, Cordova picks <UILaunchImageFile> to display instead of <UILaunchImageFile>-568h, leaving blank areas above and below the splashscreen.

      This affects iPad3 as well.

        Activity

        Andrew Grieve made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 2.6.0 [ 12323933 ]
        Resolution Fixed [ 1 ]
        Show
        Andrew Grieve added a comment - Merged in pull request: https://git-wip-us.apache.org/repos/asf?p=cordova-ios.git;a=commit;h=942d33c8e7174a5766029ea1232ba2e0df745c3f
        Hide
        Ryan Barber added a comment -

        Perfect, that's exactly what I was thinking. thanks James.

        -Ryan


        “There’s nothing sadder to me than associations held together by nothing
        but the glue of postage stamps" - East of Eden

        Show
        Ryan Barber added a comment - Perfect, that's exactly what I was thinking. thanks James. -Ryan – “There’s nothing sadder to me than associations held together by nothing but the glue of postage stamps" - East of Eden
        Hide
        James Jong added a comment -
        Show
        James Jong added a comment - Submitted pull request: https://github.com/apache/cordova-ios/pull/24
        Hide
        James Jong added a comment -

        Ryan hasn't gotten to working on this yet. He's asked that I go ahead and submit a fix for the iphone & ipad issue. I'll work on getting it in today.

        Show
        James Jong added a comment - Ryan hasn't gotten to working on this yet. He's asked that I go ahead and submit a fix for the iphone & ipad issue. I'll work on getting it in today.
        James Jong made changes -
        Assignee Shazron Abdullah [ shazron ] James Jong [ wjamesjong ]
        James Jong made changes -
        Field Original Value New Value
        Environment iPhone 5 iPhone 5 , iPad 3
        Description When apps start on the iPhone 5, iOS picks <UILaunchImageFile>-568h. When Cordova starts with AutoHideSplashScreen set to false, Cordova picks <UILaunchImageFile> to display instead of <UILaunchImageFile>-568h, leaving blank areas above and below the splashscreen. When apps start on the iPhone 5, iOS picks <UILaunchImageFile>-568h. When Cordova starts with AutoHideSplashScreen set to false, Cordova picks <UILaunchImageFile> to display instead of <UILaunchImageFile>-568h, leaving blank areas above and below the splashscreen.

        This affects iPad3 as well.
        Hide
        James Jong added a comment -

        I was able to see the problem using non-default images with UILaunchImageFile defined. I agree that the correct fix would be to check and use UILaunchImageFile if defined. If not, then use 'Default'.

        Show
        James Jong added a comment - I was able to see the problem using non-default images with UILaunchImageFile defined. I agree that the correct fix would be to check and use UILaunchImageFile if defined. If not, then use 'Default'.
        Hide
        Shazron Abdullah added a comment -

        Reference this issue. Thanks!

        Show
        Shazron Abdullah added a comment - Reference this issue. Thanks!
        Hide
        Ryan Barber added a comment -

        Cool. Should the commit/pull request reference this issue, or should I create a new one?

        Show
        Ryan Barber added a comment - Cool. Should the commit/pull request reference this issue, or should I create a new one?
        Hide
        Andrew Grieve added a comment -

        Using UILaunchImageFile sounds like a better solution. Would very much appreciate a patch!

        Be sure to follow sign the Apache CLI (instructions here: http://wiki.apache.org/cordova/ContributorWorkflow

        Show
        Andrew Grieve added a comment - Using UILaunchImageFile sounds like a better solution. Would very much appreciate a patch! Be sure to follow sign the Apache CLI (instructions here: http://wiki.apache.org/cordova/ContributorWorkflow
        Hide
        Ryan Barber added a comment -

        We're using our own custom named images by setting the 'UILaunchImageFile' key.

        The -568h image is 640 × 1136, but it's picking the 640 × 960 image.

        If appears the problem is here:

        https://github.com/apache/cordova-ios/blob/2.4.0/CordovaLib/Classes/CDVViewController.m#L655

        It only picks the -568 image if launchImageFile isn't defined. I think the correct behavour would be to set launchImageFile to 'Default' if UILaunchImageFile isn't defined, and then add the '-568' and '@2x' suffixes depending on which device is being used.

        I've also noticed upcoming 2.5.0 release doesn't support selecting the image using 'UILaunchImageFile' - Is that by design, or could I submit a patch to have that changed?

        https://github.com/apache/cordova-ios/blob/2.5.0rc1/CordovaLib/Classes/CDVSplashScreen.m#L97

        Thanks,

        Show
        Ryan Barber added a comment - We're using our own custom named images by setting the 'UILaunchImageFile' key. The -568h image is 640 × 1136, but it's picking the 640 × 960 image. If appears the problem is here: https://github.com/apache/cordova-ios/blob/2.4.0/CordovaLib/Classes/CDVViewController.m#L655 It only picks the -568 image if launchImageFile isn't defined. I think the correct behavour would be to set launchImageFile to 'Default' if UILaunchImageFile isn't defined, and then add the '-568' and '@2x' suffixes depending on which device is being used. I've also noticed upcoming 2.5.0 release doesn't support selecting the image using 'UILaunchImageFile' - Is that by design, or could I submit a patch to have that changed? https://github.com/apache/cordova-ios/blob/2.5.0rc1/CordovaLib/Classes/CDVSplashScreen.m#L97 Thanks,
        Hide
        James Jong added a comment -

        I just did a test on 240 and the iPhone 5 was pulling up the correct 568h image. Are you using your own images or the Cordova ones?

        Show
        James Jong added a comment - I just did a test on 240 and the iPhone 5 was pulling up the correct 568h image. Are you using your own images or the Cordova ones?
        Ryan Barber created issue -

          People

          • Assignee:
            James Jong
            Reporter:
            Ryan Barber
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development