Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

Launch Image is stretched and its orientation is wrong on iPhone 5
Started by evanspro Mar 23 2016 11:54 AM

- - - - -
6 replies to this topic
[TOPIC CONTROLS]
This topic has been archived. This means that you cannot reply to this topic.
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

evanspro

[GLOBAL: userInfoPane.html]
evanspro
  • Contributor

  • 186 posts
  • Corona SDK

Hi there !

 

I've got a weird problem with my game. Until now, the launcher image was showing perfectly fine on every test device. I only had a "Default-568h@2x.png" file and its size was 640x1136. At the time, there was no reference to the launch image in the build.settings file...

 

Yesterday, I added all the launcher images needed into the project's base directory and I also added their reference in the build.settings file :


	orientation =
	{
		default = "landscapeRight",
		supported = { "landscapeLeft", "landscapeRight" },
	},

	iphone =
	{
		plist =
		{

            -- Icon files
            CFBundleIconFiles = {
                "Icon.png",
                "Icon@2x.png",
                "Icon-60.png",
                "Icon-60@2x.png",
                "Icon-60@3x.png",
                "Icon-72.png",
                "Icon-72@2x.png",
                "Icon-76.png",
                "Icon-76@2x.png",
                "Icon-167.png",
                "Icon-Small-40.png",
                "Icon-Small-40@2x.png",
                "Icon-Small-40@3x.png",
                "Icon-Small-50.png",
                "Icon-Small-50@2x.png",
                "Icon-Small.png",
                "Icon-Small@2x.png",
                "Icon-Small@3x.png"
            },

            -- Launch image files table
            UILaunchImages = {
                {  -- iPhone 5 LandscapeLeft
                    ["UILaunchImageMinimumOSVersion"] = "7.0",
                    ["UILaunchImageName"] = "Default-568h",
                    ["UILaunchImageOrientation"] = "LandscapeLeft",
                    ["UILaunchImageSize"] = "{320, 568}"
                },
                {  -- iPhone 5 LandscapeRight
                    ["UILaunchImageMinimumOSVersion"] = "7.0",
                    ["UILaunchImageName"] = "Default-568h",
                    ["UILaunchImageOrientation"] = "LandscapeRight",
                    ["UILaunchImageSize"] = "{320, 568}"
                },
                {  -- iPad LandscapeLeft
                    ["UILaunchImageMinimumOSVersion"] = "7.0",
                    ["UILaunchImageName"] = "Default-Landscape",
                    ["UILaunchImageOrientation"] = "LandscapeLeft",
                    ["UILaunchImageSize"] = "{768, 1024}"
                },
                {  -- iPad LandscapeRight
                    ["UILaunchImageMinimumOSVersion"] = "7.0",
                    ["UILaunchImageName"] = "Default-Landscape",
                    ["UILaunchImageOrientation"] = "LandscapeRight",
                    ["UILaunchImageSize"] = "{768, 1024}"
                },
                {  -- iPhone 6 LandscapeLeft
                    ["UILaunchImageMinimumOSVersion"] = "8.0",
                    ["UILaunchImageName"] = "Default-667h",
                    ["UILaunchImageOrientation"] = "LandscapeLeft",
                    ["UILaunchImageSize"] = "{375, 667}"
                },
                {  -- iPhone 6 LandscapeRight
                    ["UILaunchImageMinimumOSVersion"] = "8.0",
                    ["UILaunchImageName"] = "Default-667h",
                    ["UILaunchImageOrientation"] = "LandscapeRight",
                    ["UILaunchImageSize"] = "{375, 667}"
                },
                {  -- iPhone 6 Plus LandscapeLeft
                    ["UILaunchImageMinimumOSVersion"] = "8.0",
                    ["UILaunchImageName"] = "Default-Landscape-736h",
                    ["UILaunchImageOrientation"] = "LandscapeLeft",
                    ["UILaunchImageSize"] = "{414, 736}"
                },
                {  -- iPhone 6 Plus LandscapeRight
                    ["UILaunchImageMinimumOSVersion"] = "8.0",
                    ["UILaunchImageName"] = "Default-Landscape-736h",
                    ["UILaunchImageOrientation"] = "LandscapeRight",
                    ["UILaunchImageSize"] = "{414, 736}"
                },
                {  -- iPad Pro Landscape Right
                    ["UILaunchImageMinimumOSVersion"] = "9.0",
                    ["UILaunchImageName"] = "Default-Landscape-1366",
                    ["UILaunchImageOrientation"] = "LandscapeRight",
                    ["UILaunchImageSize"] = "{1024, 1366}"
                },
                {  -- iPad Pro Landscape Left
                    ["UILaunchImageMinimumOSVersion"] = "9.0",
                    ["UILaunchImageName"] = "Default-Landscape-1366",
                    ["UILaunchImageOrientation"] = "LandscapeLeft",
                    ["UILaunchImageSize"] = "{1024, 1366}"
                },
            },

But now, on my iPhone 5, the launch image is stretched and its orientation is wrong. Like this (this is supposed to be shown in landscape mode, so the legal mentions should be at the bottom of the picture, not at the left) :

egz_launchimage1.png

 

 

And if I double tap the "Home" button, this is what I've got. Again, the image orientation is totally wrong.

 

egz_launchimage2.png

 

This is probably a stupid mistake but if you have any idea on how to fix this...

 

BONUS QUESTION : Would it be ok to submit an app with only one launch image (Default-568h@2x.png) ?



[TOPIC: post.html]
#2

roaminggamer

[GLOBAL: userInfoPane.html]
roaminggamer
  • Corona Geek

  • 7,587 posts
  • Corona SDK

@evanspro,

 

No.  I don't think this is your fault.  I've recently had clients complain about the same issue.  We were never able to track it down so I merely modified their launch images to be pre-rotated and scaled so when the 'wrong scaling' occurred it looked right.

 

Yes, that is a totally bogus solution, but anyone out there who has been up against the wire knows, sometimes you make compromises to get the job done.

 

This is especially hard to test since I don't have enough devices to verify all of the orientations.  Sounds like you or I should file a bug against this and provide a test case so that the Corona staff (who, in all likelihood, collectively have more devices than you and I) can resolve this once and for all.

 

If you don't bite, I'll put in on my schedule for after GDT closed-beta release.



[TOPIC: post.html]
#3

roaminggamer

[GLOBAL: userInfoPane.html]
roaminggamer
  • Corona Geek

  • 7,587 posts
  • Corona SDK

Oh, and and I want know about the 'one launch image' question too.  Sometimes my games' launch images take more space than the rest of the game assets.  It's ridiculous :blink: how many launch images we need nowadays (I'm talking to you Apple...)



[TOPIC: post.html]
#4

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 25,913 posts
  • Enterprise

iPhones with the exception of the 6 plus size do not use landscape launch images. You have to provide your 568h@2x image that is 640px wide an 1136px tall. You have to include the Portrait orientation for this in your build.settings. If your app is locked into a landscape only layout, design your launch image so that it's rotated.  That is the final image has to be 640px wide.

 

Rob



[TOPIC: post.html]
#5

evanspro

[GLOBAL: userInfoPane.html]
evanspro
  • Contributor

  • 186 posts
  • Corona SDK

Hi Roaminggamer and Rob !
 
Thanks to both of you for answering. I've made some changes and it seems to work fine now. In the end, knowing that my game should be playable on any iPhone starting from the 5, and on iPad, my build.setting file looks like to that :
 
            UILaunchImages = {
                {  -- iPhone 5 Portrait
                    ["UILaunchImageMinimumOSVersion"] = "7.0",
                    ["UILaunchImageName"] = "Default-568h",
                    ["UILaunchImageOrientation"] = "Portrait",
                    ["UILaunchImageSize"] = "{320, 568}"
                },
                {  -- iPhone 6 LandscapeLeft
                    ["UILaunchImageMinimumOSVersion"] = "8.0",
                    ["UILaunchImageName"] = "Default-667h",
                    ["UILaunchImageOrientation"] = "LandscapeLeft",
                    ["UILaunchImageSize"] = "{375, 667}"
                },
                {  -- iPhone 6 LandscapeRight
                    ["UILaunchImageMinimumOSVersion"] = "8.0",
                    ["UILaunchImageName"] = "Default-667h",
                    ["UILaunchImageOrientation"] = "LandscapeRight",
                    ["UILaunchImageSize"] = "{375, 667}"
                },
                {  -- iPhone 6 Plus LandscapeLeft
                    ["UILaunchImageMinimumOSVersion"] = "8.0",
                    ["UILaunchImageName"] = "Default-Landscape-736h",
                    ["UILaunchImageOrientation"] = "LandscapeLeft",
                    ["UILaunchImageSize"] = "{414, 736}"
                },
                {  -- iPhone 6 Plus LandscapeRight
                    ["UILaunchImageMinimumOSVersion"] = "8.0",
                    ["UILaunchImageName"] = "Default-Landscape-736h",
                    ["UILaunchImageOrientation"] = "LandscapeRight",
                    ["UILaunchImageSize"] = "{414, 736}"
                },
                {  -- iPad LandscapeLeft
                    ["UILaunchImageMinimumOSVersion"] = "7.0",
                    ["UILaunchImageName"] = "Default-Landscape",
                    ["UILaunchImageOrientation"] = "LandscapeLeft",
                    ["UILaunchImageSize"] = "{768, 1024}"
                },
                {  -- iPad LandscapeRight
                    ["UILaunchImageMinimumOSVersion"] = "7.0",
                    ["UILaunchImageName"] = "Default-Landscape",
                    ["UILaunchImageOrientation"] = "LandscapeRight",
                    ["UILaunchImageSize"] = "{768, 1024}"
                },
                {  -- iPad Pro Landscape Right
                    ["UILaunchImageMinimumOSVersion"] = "9.0",
                    ["UILaunchImageName"] = "Default-Landscape-1366",
                    ["UILaunchImageOrientation"] = "LandscapeRight",
                    ["UILaunchImageSize"] = "{1024, 1366}"
                },
                {  -- iPad Pro Landscape Left
                    ["UILaunchImageMinimumOSVersion"] = "9.0",
                    ["UILaunchImageName"] = "Default-Landscape-1366",
                    ["UILaunchImageOrientation"] = "LandscapeLeft",
                    ["UILaunchImageSize"] = "{1024, 1366}"
                },
            },
 
I only have one image for all the iPhones in portrait mode (568@2x - 640x1136) that should show up in landscape mode, plus the images needed for the iPhone 6 Plus and all the images needed for iPad. It does work (at least on my iPhone 5), but could you confirm that this is the right way to do it ?


[TOPIC: post.html]
#6

theromero

[GLOBAL: userInfoPane.html]
theromero
  • Enthusiast

  • 80 posts
  • Corona SDK

Well, somehow launch images are not working like they should.

 

I have all the images in the main directory, all the build settings are correct. 

 

No matter which platform I am testing the app on, it always uses Default-Landscape.png (1024x768).

 

Even though I've rotated my images to be portrait or landscape, nothing changes.

 

I tried this on PUBLIC builds and daily builds. They're all the same. Not working.



[TOPIC: post.html]
#7

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 25,913 posts
  • Enterprise

Hi @theromero. I emailed you a test project to see if it behaves properly for you. Please let me know if that helps you out. If it does, I'll see about releasing it to the world as a base example.

 

Rob




[topic_controls]
[/topic_controls]