Screenshots and new iPhone size compatibility

^ thanks Rob ! Would love to know the official results too…

My ghetto test methods from the other day came back with odd results:

Without “-568h” :

iOS 8 device : OK

iOS 8 Simulator : OK

Without “-667h”:

iOS 8 device : Cannot Test

iOS 8 Simulator : Not OK

With "-667h:

iOS 8 Simulator : OK

Without “-736h”:

iOS 8 device : Cannot Test

iOS 8 Simulator : Not OK (it actually blows up the 320x480 launch image!)

With "-736h:

iOS 8 Simulator : OK

Without “-Portrait”: (iPad)

iOS 8 device: OK

iOS 8 Simulator : OK

@newbieLUA

I can confirm the same results. It seems that Apple’s documentation doesn’t live up to their statements.

Corona Labs’ recommendations do seem to be the best guarantee to make things work at the moment.

HOWEVER.

As soon as the UILaunchImages key is used, landscape only apps still do not display a splash screen (as I’ve reported far above). It only displays a black screen. This isn’t a Corona issue. I suspect this is an issue with Xcode 6 / iOS 8 as it affects all devices running iOS 8 (maybe even iOS 7 if compiled with Xcode 6 / iOS 8 SDK).

I’m still investigating, and I’m in the process of creating a sample project to display the issue.

Thanks Rob. I meant exactly what @ingemar said. I also prefer to follow Corona standards regarding name. I was just asking since the Apple docs was saying differently and the iPhone5 Launch image specification on the plist was never required to active the tall device.

@newbieLUA and @ingemar, thanks for the tests. So it appears that Corona docs is the way to go. I was not able to get a iPhone 6 yet, and my tests on iOS Simulator (using Corona target build to 7.1) didn’t show to be accurate (even without the Default-568h, the tall mode was always enabled, which is not the case on the actual device)

For anyone interested, I’ve started a new topic about the “Black Launch Screen” problem on iOS 8 here:

http://forums.coronalabs.com/topic/51457-black-screen-on-launch-with-ios-8-landscape-apps/

If you use Inkscape, this might help.   Or you could probably plug in your own command line exporter.   Just run ‘lua icon.lua’ in your project directory and it spits out the icons, launch images, and Google featured image, which is now required on Google Play.

local inkscape = "/Applications/Inkscape.app/Contents/Resources/bin/inkscape" local MODEL\_DIR = "../models/" local icons = { -- iOS { suffix = "", w = 57, h = 57 }, { suffix = "@2x", w = 114, h = 114 }, { suffix = "-60", w = 60, h = 60 }, { suffix = "-60@2x", w = 120, h = 120 }, { suffix = "-60@3x", w = 180, h = 180 }, { suffix = "-Small-40@3x", w = 120, h = 120 }, { suffix = "-Small@3x", w = 87, h = 87 }, { suffix = "-76", w = 76, h = 76 }, { suffix = "-76@2x", w = 152, h = 152 }, { suffix = "-Small", w = 29, h = 29 }, { suffix = "-Small@2x", w = 58, h = 58 }, { suffix = "-40", w = 40, h = 40 }, { suffix = "-40@2x", w = 80, h = 80 }, { suffix = "-Small-50", w = 50, h = 50 }, { suffix = "-Small-50@2x", w = 100, h = 100 }, { suffix = "-72", w = 72, h = 72 }, { suffix = "-72@2x", w = 114, h = 114 }, -- Android { suffix = "-ldpi", w = 36, h = 36 }, { suffix = "-mdpi", w = 48, h = 48 }, { suffix = "-hdpi", w = 72, h = 72 }, { suffix = "-xhdpi", w = 96, h = 96 }, { suffix = "-xxhdpi", w = 144, h = 144 }, } local LaunchScreenSizes = { { suffix = "", w = 320, h = 480 }, { suffix = "@2x", w = 640, h = 960 }, { suffix = "-568h@2x", w = 640, h = 1136 }, { suffix = "-667h@2x", w = 750, h = 1334 }, { suffix = "-736h@3x", w = 1242, h = 2208 }, { suffix = "-Landscape-736h@3x", w = 2208, h = 1242 }, { suffix = "-Portrait", w = 768, h = 1004 }, { suffix = "-Portrait@2x", w = 1536, h = 2008 }, { suffix = "-Landscape", w = 1024, h = 768 }, { suffix = "-Landscape@2x", w = 2048, h = 1496 }, } local function exportIcons() local nm = "Icon" local mod\_nm = MODEL\_DIR .. nm .. ".svg" for i=1, #icons do local parms = icons[i] local cmd = inkscape .. " -f " .. mod\_nm .. " -e " .. nm .. parms.suffix .. ".png -w " .. tostring(parms.w) .. " -h " .. tostring(parms.h) print(cmd) os.execute(cmd) end -- Special renders local cmd = inkscape .. " -f " .. mod\_nm .. " -e GooglePlay512x512.png -w 512 -h 512" print(cmd) os.execute(cmd) local cmd = inkscape .. " -f " .. mod\_nm .. " -e itunes1024x1024.png -w 1024 -h 1024" print(cmd) os.execute(cmd) end local function exportLaunchScreens() local nm = "LaunchScreen" local mod\_nm = MODEL\_DIR .. nm .. ".svg" for i=1, #LaunchScreenSizes do local parms = LaunchScreenSizes[i] local cmd = inkscape .. " -f " .. mod\_nm .. " -e Default" .. parms.suffix .. ".png -w " .. tostring(parms.w) .. " -h " .. tostring(parms.h) print(cmd) os.execute(cmd) end end local function exportGoogleFeaturedImage() local nm = "GoogleFeaturedImage" local mod\_nm = MODEL\_DIR .. nm .. ".svg" local cmd = inkscape .. " -f " .. mod\_nm .. " -e " .. nm .. ".png -w 1024 -h 500" print(cmd) os.execute(cmd) end exportIcons() exportLaunchScreens() exportGoogleFeaturedImage()

For people using SVGs, this will be very handy. Thank you, Dave.

A few observations –

  1. The icon suffixes “-40” and “-40@2x” can be renamed as “-Small-40” and “-Small-40@2x” just for the sake of keeping naming convention consistent.

  2. For the launch image suffix “-Portrait”, the value of h (height) needs to be 1024 instead of 1004 (must be a typo).

  3. In the function exportLaunchScreens(), the Inkscape command seems to read the SVG file and spit out the desired image in the specified width and height. Let’s consider that an app supports only portrait orientations. The resultant portrait images would be fine, but the landscape images would have the artwork at a perpendicular angle with respect to a landscape orientation. This should be fine since the app supports only portrait orientations. But what if the app supported all orientations? Also, what about landscape-only apps? The portrait images for iPhone 3, 4 & 5 are the ones used by iOS as launch images on those devices and hence the orientation of the artwork would be wrong.

One solution is to maintain both portrait and landscape versions of the launch image SVG file and create two corresponding portrait and landscape LUA functions. Another possibility (if Inkscape allows it) is rotation of the landscape (or portrait, depending on the way the SVG file is created) images after creation.

For iOS 6 the iPad launch images were either 1024 x 748 or 768 x 1004.  Starting with iOS 7 they standardized them to 1024 x 768/768 x 1024.

Crap, I missed that and just uploaded a binary.

:frowning:

It won’t matter much.

Rob

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/