Thanks for the clarification, looking forward to basic support to at least be able to get stuff properly sized.
Is anyone else having problems uploading icons and screen shots that are PNG, due to alpha and transparencies? Minor nuisance but it wasn’t there before, not sure if it’s due to iOS 8 or new sizes but it’s another step Apple wants.
I found JPEG is not a problem.
Exactly what part of the iPhone 6/6 Plus can you not do with Corona SDK at the moment?
Rob
From my understand and what I’ve observed, you can’t build/publish anything that targets the devices specifically and uses the new screen sizes. Everything built right now with Corona SDK will get scaled up on both the iPhone 6 and iPhone 6 Plus.
I might have spoken too soon. Even though it’s been said it doesn’t work, I think I was able to get it to see the proper iPhone 6 launch image by modifying UILaunchImages in the plist.
…if I may ask, anyone able to do a quick display.pixelWidth and display.pixelHeight on their iPhone 6/6+ , and be able to share what sizes does the SDK reports back?
On my iPhone 6, with modified plist file to force it to load the proper launch image, I get 750x1334
ahh… okay. Understood.
Thanks very much !!
Rob,
If the lastest builds support the new forms then:
-
what files do we need to add to support the new forms - icon file size and name, splash file size and name.
-
what are the entries that we need to add to build settings file to have iOs recognize the added icons and splash files?
a quick brief will do
hey folks, while we are waiting for Rob’s official input, I did found a way to include these information in the build.settings file and have some success…
I can only speak for build 2393a though, but hope these information help:
App Icons (doc is updated with iOS8 info)
http://docs.coronalabs.com/guide/distribution/buildSettings/index.html#appicons
From the Corona docs above, I believe there might be one additional icon missing; which is the Search/Settings @3x icon. Or Icon-Small-40@3x.png
So to accommodate the new phones with icons, just three additional files:
Icon@3x.png, Icon60-@3x.png, Icon-Small@3x.png, Icon-Small-40@3x.png
(see post #266586 for naming correction between Icon@3x.png vs Icon-60@3x.png )
Including / Overriding Launch Images ( UILaunchImages ) using plist from build.settings :
(background information)
I can confirm including UILaunchImages in build.settings does override Corona’s SDK / iOS default launch image lookup, and does not interfere with iOS 6 or earlier.
Here is my example that worked on my two iOS8 devices (iPod Touch 5th Gen + iPad 2); theoretically it should work with new iPhone 6/6+ … so please give it a go to find out.
settings = { iphone = { plist = { UILaunchImages = { { -- iPhone 4/4S ["UILaunchImageMinimumOSVersion"] = "7.0", ["UILaunchImageName"] = "MyNewLaunchImage-Portrait", ["UILaunchImageOrientation"] = "Portrait", ["UILaunchImageSize"] = "{320, 480}" }, { -- iPhone 5/5S ["UILaunchImageMinimumOSVersion"] = "7.0", ["UILaunchImageName"] = "MyNewLaunchImage-Portrait", ["UILaunchImageOrientation"] = "Portrait", ["UILaunchImageSize"] = "{320, 568}" }, { -- iPad / iPad Retina ["UILaunchImageMinimumOSVersion"] = "7.0", ["UILaunchImageName"] = "MyNewLaunchImage-Portrait", ["UILaunchImageOrientation"] = "Portrait", ["UILaunchImageSize"] = "{768, 1024}" }, { -- iPhone 6 ["UILaunchImageMinimumOSVersion"] = "8.0", ["UILaunchImageName"] = "MyNewLaunchImage-Portrait", ["UILaunchImageOrientation"] = "Portrait", ["UILaunchImageSize"] = "{375, 667}" }, { -- iPhone 6 Plus ["UILaunchImageMinimumOSVersion"] = "8.0", ["UILaunchImageName"] = "MyNewLaunchImage-Portrait", ["UILaunchImageOrientation"] = "Portrait", ["UILaunchImageSize"] = "{414, 736}" }, } } } }
You can read the full information at the stackoverflow link above, or at Apple’s plist guide here:
In my test project directory, I included two sets of launch image files which got picked up differently depending on the device; UILaunchImages only applies to iOS7 or later devices so the above settings only applied to the newer iDevices. If app is installed on an older device, it will use the old settings which is to look for “Default.png” or “Default@2x.png” at launch.
Theoretically it should work, however I’ve seen that landscape only apps have issues displaying the correct splash screen.
Sometimes only a black screen is displayed. This black screen issue must be an Apple bug (I’ve reported it). The only way around the bug I know of is to use the new Xcode Launch Screen File feature. But only Enterprise users can implement that (at the moment).
Also (to be picky) the iPhone 6 / 6 Plus only need a [“UILaunchImageMinimumOSVersion”] = “8.0”
@ingemar, thanks for catching the UILaunchImageMinimumOSVersion bit, fixed it
From the stackoverflow link above, the person mentioned it worked by applying an extra entries to the UILaunchImages key (iOS8 GM), do you think it may still work for now or it’s officially broken at this point?
Giving it an “Landscape” orientation, and then specifying portrait {width , height} dimensions
\<dict\> \<key\>UILaunchImageMinimumOSVersion\</key\> \<string\>7.0\</string\> \<key\>UILaunchImageName\</key\> \<string\>Default\</string\> \<key\>UILaunchImageOrientation\</key\> \<string\>Landscape\</string\> \<key\>UILaunchImageSize\</key\> \<string\>{320, 480}\</string\> \</dict\> \<dict\> \<key\>UILaunchImageMinimumOSVersion\</key\> \<string\>7.0\</string\> \<key\>UILaunchImageName\</key\> \<string\>Default-568h\</string\> \<key\>UILaunchImageOrientation\</key\> \<string\>Landscape\</string\> \<key\>UILaunchImageSize\</key\> \<string\>{320, 568}\</string\> \</dict\> \<dict\> \<key\>UILaunchImageMinimumOSVersion\</key\> \<string\>8.0\</string\> \<key\>UILaunchImageName\</key\> \<string\>Default-667h\</string\> \<key\>UILaunchImageOrientation\</key\> \<string\>Landscape\</string\> \<key\>UILaunchImageSize\</key\> \<string\>{375, 667}\</string\> \</dict\> \<dict\> \<key\>UILaunchImageMinimumOSVersion\</key\> \<string\>8.0\</string\> \<key\>UILaunchImageName\</key\> \<string\>Default-736h\</string\> \<key\>UILaunchImageOrientation\</key\> \<string\>Landscape\</string\> \<key\>UILaunchImageSize\</key\> \<string\>{414, 736}\</string\> \</dict\> \<dict\> \<key\>UILaunchImageMinimumOSVersion\</key\> \<string\>7.0\</string\> \<key\>UILaunchImageName\</key\> \<string\>Default-Landscape\</string\> \<key\>UILaunchImageOrientation\</key\> \<string\>Landscape\</string\> \<key\>UILaunchImageSize\</key\> \<string\>{768, 1024}\</string\> \</dict\>
^ or the equivalent translation applied into build.settings
… from stackoverflow regarding iPhone 6 Plus launch image …
All iPhone launch images need to be rotated into portrait orientation as usual EXCEPT for the iPhone 6 Plus launch image. It natively supports landscape orientation launch images, so you need to leave it’s launch image in landscape orientation.
That might work, however I’ve already switched over to using a Launch Screen File.
It allows you to only have *one* file for all devices. Very clean. (requires devices with iOS 8 though)
Just wish they had implemented the same thing for the app icon (maybe in iOS 9)
ahh okay, yes sound much better having to deal with just 1 file rather than a million of them :) :) :)
I’m seeing some surprising behavior for the iPhone 6+. Can someone confirm that I’m thinking of this correctly…
I use pixelWidth and pixelHeight for all my placement. On iPhone 6+, display.pixelWidth returns the surprising value of “834”. The physical width (in real pixels) of the 6+ is 1080 pixels, while the “virtual” size is 1242 (for the rather complicated reasons explained quite well here: http://www.paintcodeapp.com/news/iphone-6-screens-demystified).
834 seemed a bit out of place. However, it is quite close to 2x the “points” width of the display, which is 414. Although I did have to change my calculations of dots per inch (which I use to maintain some control over the physical size of the fonts to make sure text is readable) to match a fake 310 dpi (834 pixels/2.69") vs the real dpi of 401, it had the surprising benefit that I didn’t have to change my “scaling” factor to convert pixels to points when using native text inputs, because at the reported pixelWidth, the point-to-pixel mapping is still 2:1 (~834:414), as opposed to the 3:1 mapping of points that I would have had to use at full 6+ resolution (i.e., 1242:414).
So, my questions are:
-
Why 834 rather than 414x2 = 828?
-
Is this a bug or a feature? Is it slated to continue like this (i.e., can I rely on this same behavior in the future)?
-
Am I thinking about it all wrong, and could this be some artifact of not using the proper launch images yet? Does using a launch image of a certain size cause the phone to “mimic” resolutions?
Other details:
-
This is built for iOS7, not iOS8 (sorry, I can’t test for 8 because I’ve been having the error #5 problem).
-
As mentioned, I’m still using the launch images from previous builds, not images targeting iOS8 or iPhone 6/6+.
-
I’ve only tested on 6+. I haven’t had access to iPhone 6. But these issues do seem to be rather specific to the 6+.
-
I only had a couple of hours to play with the 6+, so unfortunately I don’t have the corresponding values for pixelHeight, but I would imagine they are correctly scaled to match, as everything else in my app just worked.)
…how about display.contentWidth & display.contentHeight ?
What kind of number does your device return ?
Actually nevermind that one, it is a variable set in config. But 834px is a very odd number being reported, but I think it should be a temporary problem.
Once iOS 8 detects a proper launch image “-667h@2x.png” or “-736h@3x.png”, then it should render the rest of the app correctly and reporting the correct number of pixels … this was mentioned by @dfoxinator on the regular iPhone 6 with a tweaked Info.plist
@vo1
If you don’t use launch images specifically for the iPhone sixes, the app will end up in “scaling mode”. It will take the iPhone 5 resolution and scale it up.
Also, when using Corona I see no need to use pixelWidth/pixelHeight to position things. I guess you have your reasons, but I’d recommend just letting Corona do the calculations for you, and use contentHeight/contentWidth together with your preferred scaling mode in config.lua.
I’ve made some progress tonight. I can produce a build.settings that handles the default launcher images and icons. It seems to position objects were I expect them. I’m waiting on some additional tests, but @newbieLUA’s post above basically takes care of the default.png files. The suggestions in our build guide on Icons is about right. I’m going to have another tweak made to it.
Hopefully tomorrow night I’ll have something here to tease for an upcoming blog post.
Rob
Nice Rob. Looking forward to it.
Does anyone know what system.getInfo(“model”) returns for the iPhone 6 and 6+ ?
I have an app where I use that to determine what iOS device the app is running on, that I need to update.