Help for iPhone 5 support

Hello

Is anyone willing to share how they were able to have their app(s) support iPhone 5. The reason I say this is because I made about 5-6 attempts updating apps for iPhone 5 support and all have failed. Would anyone be willing to share their method.

Thanks [import]uid: 17058 topic_id: 33548 reply_id: 333548[/import]

What kind of problems are you having?

Common problems include making sure you have your Default-568h@2x.png file named correctly. There is a place where you can copy the filename from that has the wrong “dash” in the file name. It needs to be a 640x1136 pixel image too.

Can you also post your config.lua?
[import]uid: 199310 topic_id: 33548 reply_id: 133309[/import]

Well I cant really specify the problem all I know is every time I submit it would not show that it supports iPhone 5. But when I tested on Xcode or on another persons device it works.

My config lua is here:

application =  
{  
 content =  
 {  
 width = 320,  
 height = 480,  
 scale = "letterbox",  
   
 imageSuffix =  
 {  
 ["@2x"] = 1.6,  
 ["@4x"] = 3.6  
 },  
 },  
}  

and I name my image for iPhone 5 like this Default–568h@2x.png

[import]uid: 17058 topic_id: 33548 reply_id: 133314[/import]

Your config.lua needs to support a 320x568 configuration too. Something like this:

if display.pixelHeight \> 960 then  
 application =   
 {  
 content =  
 {  
 width = 320,  
 height = 568,  
 scale = "letterBox",  
 xAlign = "center",  
 yAlign = "center",  
 imageSuffix =   
 {  
 ["@2x"] = 1.5,  
 ["@4x"] = 3.0,  
 },  
 },  
 }  
  
else  
 application =   
 {  
 content =  
 {  
 width = 320,  
 height = 480,  
 scale = "letterBox",  
 xAlign = "center",  
 yAlign = "center",  
 imageSuffix =   
 {  
 ["@2x"] = 1.5,  
 ["@4x"] = 3.0,  
 },  
 },  
 }  
end  

[import]uid: 199310 topic_id: 33548 reply_id: 133316[/import]

Would this solve my problem of my unsupported apps in the AppStore? [import]uid: 17058 topic_id: 33548 reply_id: 133317[/import]

I can only think of three things that I did for my apps:

  1. Have the Default-568h@2x.png in the right size.
  2. Make sure I was fully using the screen (the config.lua above).
  3. When submitting the app to iTunes, provided 640x1136 sized screen shots for the 4" iPhones.

Beyond that I didn’t do anything special to identify it as iPhone 5 specific.
[import]uid: 199310 topic_id: 33548 reply_id: 133353[/import]

When I edit my cofig.lua to your method all my image position on the iPhone 5 correspond to iPhone lower than 5.

Is this suppose to happen when I add iPhone 5 support to my config.lua? [import]uid: 17058 topic_id: 33548 reply_id: 133409[/import]

A lot depends on how you are positioning things. You are getting 88 additional pixels in height (based on using 320 x 568 scaling) to use. Things you are based on centering on half the height (display.contentHeight / 2 etc.) are going to be 44 pixels lower on the screen (88 / 2). Things you position at Y = 100 for instance (player.y = 100) will be 100 pixels away from the top of the screen (this is assuming a portrait app). Things you position from the bottom: (player.y = display.contentHeight - 100) will be 100 px away from the bottom just like on the other devices, but it will be 88 pixels further away from the top.

Does that make sense?

[import]uid: 199310 topic_id: 33548 reply_id: 133424[/import]

Yes that does. This is to sum up what you said to show that I understand so basically in Portrait mode
when images are positioned to the bottom screen is going to have 88 more pixels away from the top.
But with iPhone lower than 5 is “not” is going to be 88 pixels away from the top instead 44.

So basically all images for both iPhone 5 and lower when positioned between 0-480 pixels will be positioned the same. But when it goes over 480 pixels the iPhone 5 will have room for more space but not iPhone lower than 5 right? [import]uid: 17058 topic_id: 33548 reply_id: 133429[/import]

Not quite, you’ve almost got it.

Hopefully this Visual will explain it. The image on the left is your iPhone 3Gs, iPhone 4 screen. The one on the right is iPhone 5. See how the center point moves down 44 px from the left one. The bottom of the screen is 88px further from the top. Things with Y values that are fixed numbers, those are relative to the top of the screen. Y values that use: display.contentHeight / 2 or display.contentHeight * 0.5 or display.contentCenterY to position things near the center, those will be 44px further down the screen. Things at the bottom using display.contentHeight are 88 px further down the screen.

[import]uid: 199310 topic_id: 33548 reply_id: 133439[/import]

Ok makes sense so basically iPhone 5 center is 44px lower than iPhone 3Gs, and 4 and “using display.contentHeight are 88 px further down the screen.”

Ok because when I coded my game I did not use display.contentHeight when I was specifying for iPhone 5. So when I added your config.lua method my image position for iPhone 5 were off positioned.

When I did not have your method for config.lua the top screen instead of being 0 for iPhone 5 it was instead around -30 or something and bottom was 480. So the iPhone 5 would go from -30-480 instead of 0-568.

[import]uid: 17058 topic_id: 33548 reply_id: 133441[/import]

What kind of problems are you having?

Common problems include making sure you have your Default-568h@2x.png file named correctly. There is a place where you can copy the filename from that has the wrong “dash” in the file name. It needs to be a 640x1136 pixel image too.

Can you also post your config.lua?
[import]uid: 199310 topic_id: 33548 reply_id: 133309[/import]

Well I cant really specify the problem all I know is every time I submit it would not show that it supports iPhone 5. But when I tested on Xcode or on another persons device it works.

My config lua is here:

application =  
{  
 content =  
 {  
 width = 320,  
 height = 480,  
 scale = "letterbox",  
   
 imageSuffix =  
 {  
 ["@2x"] = 1.6,  
 ["@4x"] = 3.6  
 },  
 },  
}  

and I name my image for iPhone 5 like this Default–568h@2x.png

[import]uid: 17058 topic_id: 33548 reply_id: 133314[/import]

Your config.lua needs to support a 320x568 configuration too. Something like this:

if display.pixelHeight \> 960 then  
 application =   
 {  
 content =  
 {  
 width = 320,  
 height = 568,  
 scale = "letterBox",  
 xAlign = "center",  
 yAlign = "center",  
 imageSuffix =   
 {  
 ["@2x"] = 1.5,  
 ["@4x"] = 3.0,  
 },  
 },  
 }  
  
else  
 application =   
 {  
 content =  
 {  
 width = 320,  
 height = 480,  
 scale = "letterBox",  
 xAlign = "center",  
 yAlign = "center",  
 imageSuffix =   
 {  
 ["@2x"] = 1.5,  
 ["@4x"] = 3.0,  
 },  
 },  
 }  
end  

[import]uid: 199310 topic_id: 33548 reply_id: 133316[/import]

Would this solve my problem of my unsupported apps in the AppStore? [import]uid: 17058 topic_id: 33548 reply_id: 133317[/import]

I can only think of three things that I did for my apps:

  1. Have the Default-568h@2x.png in the right size.
  2. Make sure I was fully using the screen (the config.lua above).
  3. When submitting the app to iTunes, provided 640x1136 sized screen shots for the 4" iPhones.

Beyond that I didn’t do anything special to identify it as iPhone 5 specific.
[import]uid: 199310 topic_id: 33548 reply_id: 133353[/import]

When I edit my cofig.lua to your method all my image position on the iPhone 5 correspond to iPhone lower than 5.

Is this suppose to happen when I add iPhone 5 support to my config.lua? [import]uid: 17058 topic_id: 33548 reply_id: 133409[/import]

A lot depends on how you are positioning things. You are getting 88 additional pixels in height (based on using 320 x 568 scaling) to use. Things you are based on centering on half the height (display.contentHeight / 2 etc.) are going to be 44 pixels lower on the screen (88 / 2). Things you position at Y = 100 for instance (player.y = 100) will be 100 pixels away from the top of the screen (this is assuming a portrait app). Things you position from the bottom: (player.y = display.contentHeight - 100) will be 100 px away from the bottom just like on the other devices, but it will be 88 pixels further away from the top.

Does that make sense?

[import]uid: 199310 topic_id: 33548 reply_id: 133424[/import]

Yes that does. This is to sum up what you said to show that I understand so basically in Portrait mode
when images are positioned to the bottom screen is going to have 88 more pixels away from the top.
But with iPhone lower than 5 is “not” is going to be 88 pixels away from the top instead 44.

So basically all images for both iPhone 5 and lower when positioned between 0-480 pixels will be positioned the same. But when it goes over 480 pixels the iPhone 5 will have room for more space but not iPhone lower than 5 right? [import]uid: 17058 topic_id: 33548 reply_id: 133429[/import]

Not quite, you’ve almost got it.

Hopefully this Visual will explain it. The image on the left is your iPhone 3Gs, iPhone 4 screen. The one on the right is iPhone 5. See how the center point moves down 44 px from the left one. The bottom of the screen is 88px further from the top. Things with Y values that are fixed numbers, those are relative to the top of the screen. Y values that use: display.contentHeight / 2 or display.contentHeight * 0.5 or display.contentCenterY to position things near the center, those will be 44px further down the screen. Things at the bottom using display.contentHeight are 88 px further down the screen.

[import]uid: 199310 topic_id: 33548 reply_id: 133439[/import]