Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

How to activate "Optimized for iPhone 6 / iPhone 6 Plus"
Started by ingemar Oct 10 2014 08:15 PM

92 replies to this topic
[TOPIC CONTROLS]
Page 3 of 4 1 2 3 4
This topic has been archived. This means that you cannot reply to this topic.
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#51

jonjonsson

[GLOBAL: userInfoPane.html]
jonjonsson
  • Corona Geek

  • 1,051 posts
  • Corona SDK

i've spent hours on this without success. I can't imagine what I'm doing wrong, the tutorial is very simple. I just get a black screen on Xcode simulator. Does anyone have a vertical nib with image only that I can try?

 

Maybe there is something wrong with my ibtool, I get this message frequently "Interface Builder could not open the document LaunchScreen.xib" because it does not exist." despite being in the same directory. Then I use sudo and it will work, change permissions on the nib etc but still no dice.



[TOPIC: post.html]
#52

jonjonsson

[GLOBAL: userInfoPane.html]
jonjonsson
  • Corona Geek

  • 1,051 posts
  • Corona SDK

OK tried on iPhone 5 device for the first time and it works but not filling out the screen. Still black screen on iPhone 6+ in Xcode simulator. I guess I need to experiment more... 



[TOPIC: post.html]
#53

avlepel

[GLOBAL: userInfoPane.html]
avlepel
  • Contributor

  • 135 posts
  • Corona SDK

Hi Jon,

 

please find my IB project attached, it uses portrait and the whole screen is filled, due to the constraints.

 

I guess you can just take the .nib file from the 

 

/_launchimage-freezeV2/LaunchImage/Base.lproj/

 

folder and copy it and the three "Default...png" files from

 

/_launchimage-freezeV2/LaunchImage/Images.xcassets/Default.imageset/

 

into your project folder. 

 

Just change the "Default...png" images and you should be good to go, worked for me on the iPad Air and the iPhone 6. 

 

But don't forget: Like I told you a few posts above I use the "zoomEven" setting in my config.lua, and I scale the splash screens in my IB project the same way.

 

Good luck,

Andreas

 

Attached Files



[TOPIC: post.html]
#54

jonjonsson

[GLOBAL: userInfoPane.html]
jonjonsson
  • Corona Geek

  • 1,051 posts
  • Corona SDK

Thank you very much Andreas. It's late now so I'll give it a go tomorrow.

[TOPIC: post.html]
#55

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 26,682 posts
  • Enterprise

I've been getting the error from ibtool saying it can't find the .xib file.  I googled the error and it suggested that I kill a daemon that ibtool starts up from the command line:

 

killall ibtoold

 

When you run the ibtool command again, it will spew some errors:

 

robs-MBP:Base.lproj rmiracle$ ps auxww | grep ibtool
rmiracle         2611   0.0  0.0  2443012    676 s000  S+    7:50PM   0:00.00 grep ibtool
rmiracle         2605   0.0  0.4  3656444  60492   ??  Ss    7:49PM   0:01.77 /Applications/Xcode.app/Contents/Developer/usr/bin/ibtoold --sending-client-environment
robs-MBP:Base.lproj rmiracle$ killall ibtoold
robs-MBP:Base.lproj rmiracle$ ps auxww | grep ibtool
rmiracle         2615   0.0  0.0  2432772    648 s000  S+    7:50PM   0:00.00 grep ibtool
robs-MBP:Base.lproj rmiracle$ ibtool --compile LaunchScreen.nib LaunchScreen.xib
Oct 29 19:50:31 robs-MBP.attlocal.net ibtoold[2616] <Warning>: CGSConnectionByID: 0 is not a valid connection ID.
Oct 29 19:50:31 robs-MBP.attlocal.net ibtoold[2616] <Warning>: CGSConnectionByID: 0 is not a valid connection ID.
Oct 29 19:50:31 robs-MBP.attlocal.net ibtoold[2616] <Warning>: CGSConnectionByID: 0 is not a valid connection ID.
Oct 29 19:50:31 robs-MBP.attlocal.net ibtoold[2616] <Warning>: Invalid Connection ID 0
robs-MBP:Base.lproj rmiracle$ ibtool --compile LaunchScreen.nib LaunchScreen.xib

robs-MBP:Base.lproj rmiracle$

 

But run it again and it seems to work.

 

Rob



[TOPIC: post.html]
#56

jonjonsson

[GLOBAL: userInfoPane.html]
jonjonsson
  • Corona Geek

  • 1,051 posts
  • Corona SDK

Found that one too Rob but didn't try to run the second time :) Nice find.

 

I guess my other non ibtool problems come from the fact that the iPhone 6+ Xcode simulator does not display the launch image ever? Is it like that for you guys?

 

Andreas nib file worked by dropping it into my project with my own images on all simulators except the iPhone 6 plus which as a black screen.

 

Edit: I updated to Xcode 6.1 and things seem to be fine in the iPhone 6 plus simulator now. Maybe recommend 6.1 in the tutorial, I'm guessing 6.01 has issue with 6+ sim. I had to use command line to open the correct sim with 6.1 though. 



[TOPIC: post.html]
#57

avlepel

[GLOBAL: userInfoPane.html]
avlepel
  • Contributor

  • 135 posts
  • Corona SDK

Hi Jon,

 

a few days ago I sent in my iPhone 6 and ordered an iPhone 6 Plus, it is much more important for testing and e.g. for making app previews (that we will then scale down for iPhone 5/6).

 

I hope that beginning next week I have the iPhone 6 Plus and can test this on the device. Because I'm still curios if on the 6 Plus I will have a problem with the orientation switching to landscape or not (I don't want this, I only support portrait, but the 6 Plus handles this a little bit differently, the device being unsure of being a tablet or a phone...).

 

Best,

Andreas



[TOPIC: post.html]
#58

avlepel

[GLOBAL: userInfoPane.html]
avlepel
  • Contributor

  • 135 posts
  • Corona SDK

One more problem with @2x, @3x, @4x:

 

When I test the .nib on the iPad Air in portrait format (1536x2048 pixel) the splash screen "Default@2x.png" is shown - for testing I wrote some text like "1x", "2x", ... into all my splash screens (that are connected to the .nib file), showing the different resolutions.

 

So, the system works, the .nib is accepted by the device, the splash screen is displayed.

 

BUT:

 

The iPad Air has 1536x2048 pixels, and these are my splash screens:

 

"Default.png" - 320x480

 

"Default@2x.png" - 640x960

"Default@3x.png" - 960x1440

"Default@4x.png" - 1280x1920

 

Why is the "Default@2x.png" with 640x960 pixel shown, and not this one: "Default@4x.png" - with 1280x1920 pixel?

 

It should not matter what is stated in the config.lua, but as somebody is bound to ask anyhow, here it is:

 

width = 320,
height = 480,
scale = "zoomEven",
 
imageSuffix =
{
   ["@2x"] = 1.5,
   ["@3x"] = 2.5,
   ["@4x"] = 3.5,
},
 
@Jon:
 
Can you test this, too? I don't have my iPhone 6 anymore (waiting for the 6 Plus), and it would be good to know what happens on these devices.
 
Best,
Andreas


[TOPIC: post.html]
#59

jonjonsson

[GLOBAL: userInfoPane.html]
jonjonsson
  • Corona Geek

  • 1,051 posts
  • Corona SDK

@Andreas: Sorry I don't have iPhone 6, I have just been testing in the simulator and hoping for the best.



[TOPIC: post.html]
#60

newbieLUA

[GLOBAL: userInfoPane.html]
newbieLUA
  • Enthusiast

  • 48 posts
  • Corona SDK

Hey @Andreas,

 

Give this a try :

 

For iPad, name your image as "Default@2x~ipad.png" , and then for iPhones, name them as:

 

Default-568h@2x~iphone.png

Default-667h@2x~iphone.png

Default-736h@3x~iphone.png

and to be safe, keep another copy named:

Default@2x~iphone.png

 

 

 

There is no "@4x" in Apple's iOS standard, only @2x and @3x. iPad Retina will still be considered @2x therefore, it will only pull Default@2x as the launch image. To differentiate them between iPhone & iPad, you can add the ~iwhatever attribute at the end of your filename and iOS will pick them out automagically.

 

Hope this helps!



[TOPIC: post.html]
#61

avlepel

[GLOBAL: userInfoPane.html]
avlepel
  • Contributor

  • 135 posts
  • Corona SDK

Hi newbieLUA,

 

thanks, but I don't use "Default-736h..." etc. screens, because I use the splash screens referenced in the .nib, see the discussion above.

 

And it works, I just could not understand why the "...@4x" image was not displayed, I didn't know that Apple uses "...@3x" as a maximum, thanks for the tip.

 

Best,

Andreas



[TOPIC: post.html]
#62

avlepel

[GLOBAL: userInfoPane.html]
avlepel
  • Contributor

  • 135 posts
  • Corona SDK

Success!

 

As of today the update for "Freeze!" using the .nib file is in the App Store and

 

* is marked as "This app is optimized for iPhone 5, iPhone 6 and iPhone 6 Plus" :-)

* has an app preview for iPad, iPhone 5, iPhone 6 and iPhone 6 Plus

* uses the new icon sizes for iOS 8

 

Ok, it's released now, but nevertheless I will do some additional tests when I get the iPhone 6 Plus next week.

 

Thanks to @toga, @newbieLUA, @ingemar, @Lerg, @jonjonsson and @Rob who all worked to solve the problem!

 

Best,

Andreas



[TOPIC: post.html]
#63

haakon

[GLOBAL: userInfoPane.html]
haakon
  • Contributor

  • 188 posts
  • Enterprise

Hi all,

 

I have been struggling with the Launch Screen all day. I immediately got it working, though, so this is about scaling. I have set the Deployment Target to 8.0, which will leave us with the need to support devices starting from the 4s, 5th gen iPod and 2. gen iPad.

 

So far so good.

 

We are using letterbox scaling, and we only support Portrait mode.

 

In the xcassets there are slots for 6 images, 4 of them for iPhone and 2 of them for iPad.

 

We initially had problems with the iphone 6 showing a wrongly scaled splash, and to fix that I had to add the iphone6 splash to the iPhone slot named 2x. But that made the 4s start scaling wrong, since the 4x now use the iphone 6 image.

 

It's almost as there is missing a slot in the xcassets...

 

I have no clue how to fix this. The enclosed xcode project is fully contained, and it reproduces the problem easily. Just try running it with the different xcode simulators, and see how the iPhone 4s simulator scales the image incorrect.

 

Anyone has a solution to this?

 

Here's the xcode project: https://s3-eu-west-1.amazonaws.com/lageng/TestinLaunchImage.zip

 

Thanks!



[TOPIC: post.html]
#64

haakon

[GLOBAL: userInfoPane.html]
haakon
  • Contributor

  • 188 posts
  • Enterprise

...I did one more test, this time following the tutorials and the threads in this forum. The difference then is that the xcodeassets has 3 images instead of 6 - universal. Which means the same images will be used for all screens. And I tested, again using the xcode simulators, and now ALL devices use the @2x image, except from the iphone 6+ that picks up the @3x and the iPad 2 that picks up the @1x. The @2x is used for iphone 4s, iphone 5, iphone 6, ipad air, ipad retina, ipad mini 1, 2, 3. Now that is troublesome. Having no difference between the splashes picked up by the iphones or the ipads is bad, and the resolutions the different devices ends up getting in the splash images is not optimal either.



[TOPIC: post.html]
#65

haakon

[GLOBAL: userInfoPane.html]
haakon
  • Contributor

  • 188 posts
  • Enterprise

I guess the question is:_

 

How do I make ONLY the iPhone 6 and 6+ use the Launch Screen, and all other devices use the old splashes like before? Since we're using ios8 as Deployment Target it actually seems impossible to resolve this.



[TOPIC: post.html]
#66

newbieLUA

[GLOBAL: userInfoPane.html]
newbieLUA
  • Enthusiast

  • 48 posts
  • Corona SDK

@haakon, I believe any iOS8 devices will always take priority in reading .nib files over Launch Images and that's the Apple's way of how the OS behaves. 

 

I took a brief look at your .zip file.... I'm not sure if this approach would help, but you can try building the launch screen by piecing the elements together in Interface Builder.

 

a ) Set a tiling / bleeding background for your splash's background

b ) Set 3 floating images that represents 1. Game Title , 2. Main (centered) Character, 3. Company / Publisher Logo

c ) With the proper constrains, let them float and position dynamically 

 

The way I'm seeing this (could be wrong) is that the launch image set cannot pull the perfect static image dynamically and displaying/behaving like the old launch images.

 

But if we take a different approach similar to building web/html layouts, and start layering each display elements relative to the display, then I think you can achieve the perfect result:

 

a ) Create a tiling background that bleeds out of screen, so wider displays (iPad vs iPhone) can make use of it

b ) Create a floating title image, center aligned, stays at the top of screen

c ) Create a floating character image, center aligned, stays center of screen

d ) Create a floating footer image, center aligned, stays at the bottom of screen

 

Hope this helps! Or at least hope this can give you an alternative solution in troubleshooting the problems.



[TOPIC: post.html]
#67

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 26,682 posts
  • Enterprise

If you read Walter's blog post on Adaptive screens:  http://coronalabs.com/blog/2014/10/28/resolution-independence-adaptive-content-scaling-in-corona/

 

One of the things that's important to understand is that when you think in points, to keep design elements like say a 50x50 tabBar button for a 320x480 content area the same on screen size with an iPad (non retina, mini), you would still use a 50x50 image.  It's a 1x screen, just more real estate.  On an phone with 320 points, you can get 6.5 of those buttons along the bottom.  On the iPad (vertically) you can get 15 buttons along the bottom. 

 

When you bring an iPhone 4/5/6 retina screen into play, it has twice the density of the 320x480 screens, meaning you need 2x the image quality.   The Retina iPads are 2x the density of the 1024x768 iPads, and they use the @2x assets you provide. 

 

The 3x is needed because the iPhone 6 Plus has a higher density than even the iPhone 5/6.

 

But I can see in the simple case of wanting a logo to take up say 50% of the screen, you would seem to need an @4x image, but the idea behind adaptive (which Storyboard sees to be using) is that the image would just be relatively smaller on the iPads and iPhone 6 since it's more real estate than the iPhone 5.



[TOPIC: post.html]
#68

haakon

[GLOBAL: userInfoPane.html]
haakon
  • Contributor

  • 188 posts
  • Enterprise

Yeah. I tested with an adaptive approach, but since we also have a continuation of the splash image like Andreas above here, where we continue showing the same image after the splash but with a loader on, it just got too complicated for a stupid little thing that a splash really is.

 

I ended up using a simpler approach. The most important thing is to get the App Store "optimized for" badges, after all. So now we have our app set up with Deployment Target ios 8, and it will only use the Launch Screen.

 

Thanks for helping out.



[TOPIC: post.html]
#69

jonjonsson

[GLOBAL: userInfoPane.html]
jonjonsson
  • Corona Geek

  • 1,051 posts
  • Corona SDK

My app passed review and got the iPhone 6 stamp. I simply dropped in the nib from Andreas with my own images. Thanks Andreas! BTW the app review process was only a day or so  :blink: 



[TOPIC: post.html]
#70

DragonGameStudio

[GLOBAL: userInfoPane.html]
DragonGameStudio
  • Enthusiast

  • 65 posts
  • Corona SDK

hello rob, i have follow your tutorial and i try to add images into it, but whenever i try to use the nib files,

i never see the image, only the text,

any clue?



[TOPIC: post.html]
#71

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 26,682 posts
  • Enterprise

This isn't an easy topic to follow, so bear with me.

 

When you add the UIImageView (well it's already in the project), you need to give it an "ImageSet" to use.  You right click in a bar and then choose "New Image Set".   By default it names that image set "Image".  There is a side effect of that.  What ever you name the image set must be the name of the files in the image set.  If you do not rename it and leave it "Image", then your files must also be named "Image.png", "Image@2x.png", "Image@3x.png".  If you want to have images named Xyzzy.png, you must rename the image set to Xyzzy. 

 

After that, back in the inspector for the UIImageView, pick the image set you want for that view.

 

Rob



[TOPIC: post.html]
#72

lokayes

[GLOBAL: userInfoPane.html]
lokayes
  • Observer

  • 1 posts
  • Corona SDK

Is it difficult to jailbreak iPhone 6 or iPhone 6 Plus?



[TOPIC: post.html]
#73

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 26,682 posts
  • Enterprise

Corona Labs does not support any of our products on jail broken or rooted devices.  As such we will not provide any support or suggestions on how to do this.

 

Rob



[TOPIC: post.html]
#74

DragonGameStudio

[GLOBAL: userInfoPane.html]
DragonGameStudio
  • Enthusiast

  • 65 posts
  • Corona SDK

Dear Rob, tq for your reply

 

i have follow your steps,

i give my UIImageView name with "Default" (casesensitive and without uppercase)

and i rename the image that iwant to use with

Default.png

Default@2x.png

Default@3x.png

and i put the LaunchScreen.nib and also the image in same directory with main.lua

 

after that i try to build it with iphone5 IOS 8.1

 

and i still got white blank launch screen

 

any other way? or maybe i miss some steps?



[TOPIC: post.html]
#75

unmoraly

[GLOBAL: userInfoPane.html]
unmoraly
  • Observer

  • 1 posts
  • Corona SDK

yeah, me also rob, got white blank launchscreen even i try to do your step,




[topic_controls]
Page 3 of 4 1 2 3 4
 
[/topic_controls]