Screenshots and new iPhone size compatibility

@ingemar

Thanks for the insight on the launch images. I suppose that is actually useful behavior, although it would be nice to understand where the 834 px width comes from (it’s not clear to me how to derive it from a scaling of iPhone 5 resolution).

I wasn’t very clear in my description. I do use contentHeight/contentWidth for everything. It’s just that I set the dimensions in the build settings using pixelWidth and pixelHeight. I found that this prevents distortion due to varying aspect ratios (esp across Android devices), scales nicely with various resolution ranges and aspect ratios, and gives smoother animation (low res content sizes seem to result in transitions occurring in bulky “steps”). Or maybe I just never got properly used to the other (recommended) method. My preference might also be due to my using Corona for a business app (vs a game), where dynamic usage of screen for displaying more content is more important than the aesthetics of item relationships that are crucial in games. 

Anyway, that’s all off-topic, though it’s worth noting that the app would otherwise scale properly for 6+ in either method, and the font/dpi issue would be the same as well. 

Thanks also to @newbieLUA, for similar advice re launch images.

[…] My preference might also be due to my using Corona for a business app (vs a game), where dynamic usage of screen for displaying more content is more important than the aesthetics of item relationships that are crucial in games. […]

Makes sense  :slight_smile:

Shouldn’t “Icon@3x.png” actually be named “Icon-60@3x.png” since its dimensions are supposed to be 180x180 and not 171x171?

Reasoning:

Icon.png = 57x57

Icon@2x.png = 114x114

Icon-60.png = 60x60

Icon-60@2x.png = 120x120

hmm yes, you are right @Parthap Murthy, thanks for pointing that out !

So I believe Corona’s doc needs updating because their’s says “Icon@3x.png

First the name of the Icon doesn’t really matter.  As long as Icon@3x.png is a 180x180 you could name it Fred.png.  Apple reads that array from build.settings and finds icons that match based on size.  They really don’t care about the names unless you leave that array out of build.settings then the names matter.

However, I’ve already pinged Brent about updating the guide to use Icon-60@3x.png for the file to be consistent with the names we are using.  I’m still unclear about the new 120x120.  With the method we recommend for your build.settings, Apple should find your Icon-60@2x.png file as a 120x120 and when it looks for the @3x version of the 40x40, it should find the existing 120x120 and we shouldn’t need two copies of it.  I don’t have a good way of testing that yet, but I don’t see why Apple would force you to have two 120x120’s.

The system.getInfo(“model”) returns “iPhone” for all iPhones.   However what you’re looking for is system.getInfo(“architectureInfo”) which the 6 Plus is “iPhone7,1” and the iPhone 6 is “iPhone7,2”

@yo1, in my testing, I’m getting the right values on the iPhone 6 plus I’ve gotten to play with and I had someone run it on an iPhone 6 and got the expected values there.

Yes, Rob. It’s more about keeping the naming convention consistent than anything else. The naming convention has been consistent thus far, so no reason to deviate now.

hey Rob , sorry to add on more confusion to this icon madness … but I just found out (via simulator & actual iOS8 [not iPhone 6/6+] devices) , that having two 120x120 icons within the same bundle will cause trouble…

Please see screenshot below; basically iOS is pulling up iPhone 6 Plus’ search icon  Icon-Small-40@3x.png  and displaying it as the app’s main icon on @2x devices (home screen)!

On the other hand, having no  Icon-Small-40@3x.png in the bundle, iPhone 6 Plus (iOS Simulator) pulls up Icon-60@2x.png as the search icon and worked just fine…

So you were 100% right in the first place !

iOS will scan and pick up only one 120x120 icon and deal with it.

The more important issue is that we would end up displaying the search icon on the home screen for smaller phones. I’m sure 99% of folks here will use the same graphic anyways so it probably won’t matter, but just wanted to point that out and see if your team may want to investigate this further, update the docs again, or take note of that when preparing future documentations.

Thanks again!

I can see corona guide updated with following launch images for iPhone 6 and 6+ 

Default-667h@2x.png

Default-736h@3x.png

Default-736h@3x.png

Can someone from corona confirm that adding these files to base directory is enough for new iPhones compatibility Or i need to add any entries in my build settings too??

I am using public build 2393 and Xcode 5.1 .

Hi @tanu.kush,

The files for launch images never needed to be specified within “build.settings”, and I don’t believe anything has changed in that regard for iOS8. Simply put them in the base directory and it should be fine.

Best regards,

Brent

Hi again,

Sorry for the confusion, but I must retract my previous statement. For iOS8, these images must be stated in “build.settings”. I’m going to update the guide on this and it should be live shortly.

Brent

So, what is the conclusion regarding the icon? I just saw that the docs was updated for us to have 2 icons with the same size (120x120). Is that the way to go?

Hi Renato,

Yes, I suggest duplicating and renaming the 120x120 icon and including both.

Ok! Thanks.

In most cases, they are going to be the same Icon so it doesn’t matter much.

Brent,

based on your reply to @tanu.kush, @newbieLUA post and Apple’s docs, I understand that we need to add the following to our build.settings regarding the iPhone 6/6+ Launch images, am I correct?

settings = { iphone = { plist = { UILaunchImages = { { -- iPhone 6 ["UILaunchImageMinimumOSVersion"] = "8.0", ["UILaunchImageName"] = "Default", ["UILaunchImageOrientation"] = "Portrait", ["UILaunchImageSize"] = "{750, 1334}" }, { -- iPhone 6 Plus ["UILaunchImageMinimumOSVersion"] = "8.0", ["UILaunchImageName"] = "Default", ["UILaunchImageOrientation"] = "Portrait", ["UILaunchImageSize"] = "{1242, 2208}" }, } } } }

Hi Renato,

The guide is now updated. It’s much more than what you list, actually. A lot of things are changing with iOS8, but if we didn’t like change, we wouldn’t be mobile developers. :wink:

http://docs.coronalabs.com/guide/distribution/buildSettings/index.html#launchimage

Thanks Brent.

The Apple docs says that we don’t need to specify the suffix on the UILaunchImageName:

UILaunchImageName (required):   (…)  The name you specify for this key should not include a filename extension, nor should it include modifiers such as @2x, -568h, ~iphone, or ~ipad.

Do you confirm that for Corona we need to specify the suffix -568h,… ?

Also, do we need to specify the iPhone 4/5 Launch files (Default-568h)  there? (Because we didn’t need them before…) 

I suspect that since you have to provide the name for the images now in the info.plist that the name itself has become irrelevant.  In other words you could have Fred@2x.png  and as long as its 640 x 1136 and you specify “Fred” in the table listed, you don’t have to name it exactly xxx.  Look at this block of code:

                { -- iPhone 5/5S                     ["UILaunchImageMinimumOSVersion"] = "7.0",                     ["UILaunchImageName"] = "Fred",                     ["UILaunchImageOrientation"] = "Portrait",                     ["UILaunchImageSize"] = "{320, 568}"                 },

You are specifying the point size of the image in the UILaunchImageSize field.  Apple is going to look at the device it’s one (iPhone 5) and it knows it needs to find the record with a size of 320x568.  It will then take the UILaunchImageName and slap an @2x.png on the end and look to see if that file exists.  If it does, you get a launch image, if it does not,  you don’t.

Since iOS 6 (when the iPhone 5 came out) required the Default-568h@2x.png file to trigger tall mode, and I don’t know if that’s still the case with iOS 7 (though it seems to be from people who have left it out), it makes sense to keep a file with that name around.  I don’t know yet how iOS 8 handles the tall mode.  Hopefully it’s gone away since the 3.5" phone isn’t supported on it.  But because our apps can still run on iOS 6, you should still keep a Default-568h@2x.png file in your folder.

Since you still need to do that, we are going to recommend you be consistent with your naming of your Launcher images and stay with Default-NNNh@2x.png and when you specify it in your build.setting’s UILaunchImages table, specify the file name and leave the @2x.png off.

This is known to work.

While Apple gives developers the freedom to do things, its much easier to just copy and paste our code that we know works and follow the convention.  When you do your own thing, it makes it much tougher for other people in the community to help solve problems when you run into them.   If you follow the conventions we lay out, when we say “Post your build.settings”, then we can spot problems easier.

Keeping the iPhone 5 as an example.

I think what Renato was asking was the Corona docs state this:

 { --iPhone 5 ["UILaunchImageMinimumOSVersion"] = "7.0", ["UILaunchImageName"] = "Default-568h", ["UILaunchImageOrientation"] = "Portrait", ["UILaunchImageSize"] = "{320, 568}" }

Shouldn’t the “-568h” be left off, and just be “Default”? This is what Apple say in their docs as Renato quoted.

If Apple’s docs are correct, I’d expect all entries in the list to be [“UILaunchImageName”] = “Default”.

The actual files in the root directory on the device should have all the modifiers though…

Possibly, but it works with it.  I’ll do some additional testing tomorrow.

Rob