Screenshots and new iPhone size compatibility

Hey guys.

I finally got my hands on iPhone 6 and went to do some test here and now I am really confused.

I just noticed that after some unknown daily build, the Default-568h@2x.png that we use to enable iPhone 5 tall mode is not required anymore.

Using daily build 2443 (or after) I am getting my app on tall mode on both iPhone 5 & 6 without any Default-xxx@xx.png image or configuration on the build.settings. Is that correct? The tall mode is now always activated without the need of extra files?

That’s not correct (at least for my Enterprise builds). If I remove the Default-568h@2x.png file, “tall-mode” is not activated.

HOWEVER!

I share your results! When I compiled my app with Corona Simulator (build 2448), my iPhone 5S went into tall mode without a launch image.

Looking at the compiled app bundle I see why. If you don’t supply your own launch image, one is created for you with the name Default-568h@2x.png (but its completely black). That’s why it works. It looks like CoronaLabs are adding some default dummy images in case some are missing.

So, you still need to specify a launch image (and should in my opinion) as otherwise you just get a rather ugly black screen during launch.

Yes, you are right. A black Default-658h is now added automatically if you don’t provide one.

So, I finished here my tests on iPhone 5 & 6 (didn’t test on iPhone 6+) regarding Launch Images and here are my conclusions:

Tall mode activation:

In recent daily builds (2443 or after by sure), you don’t need to provide any specific assets to activate tall mode on iPhone5/6. UPDATE: If you specify the iPhone 6 UILaunchImages on the build.settings, you will have to add the iPhone 5 as well, or the tall mode will not be activated.

Custom Launch Images:

iPhone 5: Just add your Default-568h@2x.png to your project root directory. No need to do anything else. UPDATE: If you specify the iPhone 6 UILaunchImages on the build.settings, you need to add the iPhone 5 as well, or the tall mode and iPhone5 Launch image will not be used.

iPhone 6: Add your Default-667h@2x.png to your project root directory and specify the following in the iphone->plist on the build.settings (Adapt the UILaunchImageOrientation for you case) :

--launch image files table            UILaunchImages = {                                 {  --iPhone 6                     ["UILaunchImageMinimumOSVersion"] = "8.0",                     ["UILaunchImageName"] = "Default-667h",                     ["UILaunchImageOrientation"] = "Portrait",                     ["UILaunchImageSize"] = "{375, 667}"                 },                            },

If you do not specify the above entry on your plist, the iPhone 6 will use the iPhone5 launch image (Default-568h@2x.png). It will scale up the image keeping the aspect ratio (i.e,  it will not be stretched to fit the whole screen) and it will entered on the screen (so, you would have little margins around the launch Image). Update: Doing more tests, it appears that the launch image will take the full screen.

iPhone 6+: I did not tested on that device. I Believe it will require similar structure of iPhone 6 (add the correspondent Default launch image and specify it on the buid.settings.  -  More info here: http://docs.coronalabs.com/guide/distribution/buildSettings/index.html) %C2%A0)

That is it. That is what I saw here during my tests (Corona daily build 2446 - building target 7.1)

UPDATE: SUMMARY: Just follow the http://docs.coronalabs.com/guide/distribution/buildSettings/index.html%C2%A0) instructions regarding Launch Images that you cannot go wrong. :slight_smile:

That’s very helpful. Thanks for that!

I’m finding behavior that doesn’t match what has been reported here, nor reported anywhere else that I could find.

I’m compiling using the Enterprise edition, and my app on iPhone 6 Plus is reporting display.screenWidth x display.screenHeight in landscape as the native 1920 x 1080 (instead of the virtual 2208 x 1242).

On the iPhone 6, the app is reporting a 3px narrower 1331 x 750 (instead of 1334 x 750). 

-Tom

@Tom

That sounds very weird. I don’t have actual devices to test on with but on the Xcode simulator it reports correctly (although there’s no display.screenWidth/screenHeight in Corona. Only display.pixelWidth/pixelHeight)

On iPhone 6 Corona reports 750 x 1334 and iPhone 6 Plus Corona reports 1242 x 2208.

Maybe it’s different on actual devices?

Xcode 6.0.1

Corona Enterprise build 2014.2451

I built and released my iPhone 6 fixes based on the XCode simulator, which returns the results we’ve all been expecting.

On real devices, I’m getting the numbers I reported (and my app, which I waited for 14 days to get through App review, disasterously didn’t work properly as a result.)

@Tom
That’s definately not good.
I think it would be a good idea to file a bug report about that.

I got my iPhone 6 last night and I know the cause of this 750 x 1331 number.  The iPhone 6 supports a normal mode and a zoomed mode.  When in the Normal mode, it shows 750 x 1334 as expected, but in this zoomed mode, Corona returns 750 x 1331.  I don’t know if this is a bug or by design, but it’s a cause. 

Rob

@Rob

I’m only guessing, but I think it’s by design. Zoomed mode will probably be activated when the app is not optimized for iPhone 6, which means iPhone 5 content area is scaled up to fit the iPhone 6 screen.

iPhone 5 resolution: 640 x 1136

iPhone 6 resolution: 750 x 1334

Scale factor based on screen width = 750 / 640 = 1.171875

1.171875 x 1136 = 1331.25 which would be 1331 if rounded to the nearest integer. If this is indeed the case, I suspect that there will be a 2-pixel wide black bar on one end and 1-pixel wide black bar on the other. Can you confirm this?

@tbuchler

This is probably why the height is being reported for iPhone 6 as 1331. This brings us to the question: Why was zoomed mode activated in the first place? Are you sure your app is fully optimized for iPhone 6? Rob will probably shed more light on this in the coming days.

Regarding 1920 x 1080 being reported for iPhone 6 Plus, it’s a known bug that Rob has already reported. You can read about it here – http://forums.coronalabs.com/topic/51465-iphone-6-plus-pixel-perfect-rendering/

I’m using Enterprise, and in XCode have LaunchImage and Icon assets with the three iPhone 6 images (Retina HD 5.5, Retina HD4.7 Portrait; and Retina HD 5.5 Landscape) populated with  PNGs as specified above (N.B.: my app starts and only runs landscape), and all of the icon images populated. I also specify a Launch Screen File for iOS 8.  

I can’t confirm 2 and 1 pixel bars as 1) the only phone that’s testing my betas is at a customer site, and 2) I’m not sure how to see those tiny black bars on a black phone.

-Tom

Prathap,

Regarding 1920x 1080: the post you refer talks about what happens if I render at 1920, I am thankful the Corona simulator has the “bug” reporting 1920. The XCode simulator shows 2203 but the actual device reports 1920, matching the Corona but not the XCode simulator.

Still not sure why it’s reporting 1920.

-Tom

@Tom

If you’re using Xcode 6’s new Launch Screen File, that should rule out the device not triggering “full resolution” mode on any device running iOS 8 as iOS should take care of that for you. As you’ve mentioned above the Xcode Simulator displays correct values (and I’ve seen the same in my own testing). So the question remains why the device is showing less resolution than it should.

I was hoping that the results from the Xcode Simulator would be more trustworthy, but that doesn’t seem to be the case. Unfortunately I won’t be able to get my hands on any of the iPhone 6’es in the near future as I live in “Samsung Land” (Korea). A release date has yet to be revealed…

I don’t remember, but I ran a test just now with the Xcode simulator and forcing the app into iPhone 5 mode and it still reported 1334 pixels, but the Xcode simulator is  a little funky…

As for the other thread on the size of the 6 Plus, I may have been mistaken.  Further testing is showing its a 1080x1920 device for Corona built apps.

Thanks Rob. This begs two questions:

  1. Why do our results differ from what the entire non-Corona world is reporting?

  2. Is the other shoe going to drop and we’ll suddenly see that number changing? 

-Tom

  1. The difference is UIKit vs. OpenGL, Metal, etc.  The Xcode simulator is assuming most native developers are using UIKit.  Most people reporting 1242x… are probably building using UIKit.  And for UIKit, Apple says its 1242x2208.  However for OpenGL, video players or other things that directly access the video card, you’re a 1080x1920 device.

  2. I would hope at some point the Xcode simulator would report the right value for OpenGL apps, but that’s on Apple.

Rob

@Rob

  1. So do we design our game assets for 1080 x 1920 instead of 1242 x 2208?

  2. Will iOS still upsample our 1080 x 1920 scene to 1242 x 2208 and then downsample it to 1242 x 2208 as mentioned in the other thread? If this is the case, does the scene still look sharp (as designed) or does it suffer from any blurriness (however slight it may be) because of the resizing processes?

You can take a screenshot of your app/game and import the screenshot on to a PC/Mac. If the screenshot has a colorful (non-black) background, then you should be able to see the black bars in an image viewer (or measure their width exactly in a graphics editor like Photoshop).

I understand if you don’t want to do this though since you’re deploying at the client’s site directly. I was just curious to find out what was going on under the hood since many of us don’t have access to the new devices yet.

@Prathap Murthy, as of now, I would say if you are specifically targeting the iPhone 6 plus, 1080x1920, but we would really respectfully request that you give Engineering some time to research best practices before you go down a path that will be difficult to come back from. 

I did a test with my son’s 6 plus and I drew two images, one designed for 1080px and one designed for 1242 and frankly there was no visible difference.  I suspect this is due to the 1242 being downsampled to the native 1080 by Corona not by the device.  This is why we need time to figure out the best practices.  iPhone 6 Plus’s have been hard to come by and we’ve only had ours for a few days.  We suspect Corona is going to render at 1080x1920 internally and that would be the Pixel Perfect size.  But again, I reiterate, give Engineering the time they need to figure this out.  We will have a whole host of recommendations on managing content areas as it’s not just the iPhone 6 plus creating confusion.

But all that said, unless you are targeting iPhones only and unless you are a glutten for punishment and want really big app bundles, you’re going to have to put up with some resampling along the way.  Your iPad Retina is 1536 x 2048.  If you’ve been using 320x480 as your content area for a while with @2x assets at 640px and @4x assets as 1280px, you are already dealing with that 1280 being resampled up to 1536px.  If you started with iPad friendly assets based on 1536px for the @4x and 768px for the @2x assets, and you’re running on a phone, you’re already down sampling.  Throw Android in the mix and you can see where having a dozen different versions of your assets are not practical (bundle size wise or your mental sanity wise).

Once Engineering has had time to figure out, we will have a blog post with our recommendations.  It won’t be this week.  This week’s is about the new iPhones, but it’s covering icons and launch images only (assuming Murphy’s law doesn’t kick in again).

Rob