Submiting for iPhone and IPad

Hi everyone!

I have 2 apps in the app store.

They are only for iPad…

But I test the apps in the corona simulator in “view for iPhone 4 and iPhone 5”

and they look and work great, they just have a --black border on left and right.

I can submit the app like that with the black border, but I read somewhere that there is a way

that you can use the same code, just include the background images for the iPhone 4 and iPhone 5 and if you use some code in config.lua or build.settings the app will know when to change images.

Also, when I build the app, should I use “Universal” or iPhone and iPad?

And also if I already have the app for iPad, do I just submit one for the iPhone,

or I have to submit a new version for both, and delete the old one?

Also the background for the iPad is – 1024 X 768

which one is for the iPhone 5 and the iPhone 4 ?

1136 X 640 ?

960 X 640 ?

none?

I hope you can help me with this.

Hello Victor,

Please view the guide+video on dynamic image selection. This is the best place to begin.

http://docs.coronalabs.com/guide/basics/configSettings/index.html

http://youtu.be/QCU_G3GCerg

Hope this helps,

Brent

Victor, you should use a “Universal build” if you want one app to support both iPhone/iPods and iPads.  However supporting different form factors is not a trivial task and it takes some different ways of thinking.

One school of thought, which I try to use involves having an oversized background that will fill both tall, thin devices like the iPhone 5 while at the same time fill short wide devices like the iPad and the iPhone 3/4’s will be in the middle.  For this to work, some of the background will not show on some screens.  The background “bleeds” off the screen a bit.  You cannot put critical artwork in these areas and you have to think a little bit differently about how you position things so that they move automatically to fit the screen shape in use.   It was the idea behind this blog post:

http://www.coronalabs.com/blog/2012/12/04/the-ultimate-config-lua-file/

It takes a bit to digest and I won’t lie, there are complexities to it.

The other school of thought is to use a fixed scale,  understand that some of your coordinates may be negative numbers (i.e. 0, 0 is not necessarily the top left of the device). and that you use code to load in device shape specific backgrounds.  This isn’t real code but should help you get the idea:

if device is iPad then

    background = display.newImageRect(“background-ipad.png”, 768, 1024)

elseif device is iPhone 5 then

    background = display.neImageRect(“background-iphone5.png”, 640, 1136)

else

    background = display.neImageRect(“background-iphone5.png”, 640, 960)

end

It requires more code and multiple files, but you can make your background fit your screen better.  I actually did a kid’s app where I had to use both techniques together.

I had a unique iPhone 5 background that I had to use because of where certain graphic elements were placed on it, but I used the ultimate config.lua to create the content area.

Read that post, perhaps several times and try to digest it.

Rob

Hi Rob and Brent.

I’m going to submit for now for the iPad and the iPhone (even if I see the black border.)

I’m going to study a lot the dynamic image, Maybe for my next app I will be ready.

When I build in corona. I have a file – icon.png (57X57)

when I build for iPad… it gives me an error, --you need a 72X72 icon.png

Then I change the icon for 72X72 and build universal

and it gives me an error – you need icon.png 57X57 for iPhone

Then I change that for 57X57

and it gives me an error – you need icon 72X72 for iPad


It’s only 1 file name, if I have 52 – it wants 72 [-- if I have 72 – it wants 52]

What do I do?

Hi Victor,

You will need to create icons for all of the device(s) you want to support. These are listed here, in the “Custom App Icons” section:

http://docs.coronalabs.com/guide/distribution/buildSettings/index.html

Brent

Hello Victor,

Please view the guide+video on dynamic image selection. This is the best place to begin.

http://docs.coronalabs.com/guide/basics/configSettings/index.html

http://youtu.be/QCU_G3GCerg

Hope this helps,

Brent

Victor, you should use a “Universal build” if you want one app to support both iPhone/iPods and iPads.  However supporting different form factors is not a trivial task and it takes some different ways of thinking.

One school of thought, which I try to use involves having an oversized background that will fill both tall, thin devices like the iPhone 5 while at the same time fill short wide devices like the iPad and the iPhone 3/4’s will be in the middle.  For this to work, some of the background will not show on some screens.  The background “bleeds” off the screen a bit.  You cannot put critical artwork in these areas and you have to think a little bit differently about how you position things so that they move automatically to fit the screen shape in use.   It was the idea behind this blog post:

http://www.coronalabs.com/blog/2012/12/04/the-ultimate-config-lua-file/

It takes a bit to digest and I won’t lie, there are complexities to it.

The other school of thought is to use a fixed scale,  understand that some of your coordinates may be negative numbers (i.e. 0, 0 is not necessarily the top left of the device). and that you use code to load in device shape specific backgrounds.  This isn’t real code but should help you get the idea:

if device is iPad then

    background = display.newImageRect(“background-ipad.png”, 768, 1024)

elseif device is iPhone 5 then

    background = display.neImageRect(“background-iphone5.png”, 640, 1136)

else

    background = display.neImageRect(“background-iphone5.png”, 640, 960)

end

It requires more code and multiple files, but you can make your background fit your screen better.  I actually did a kid’s app where I had to use both techniques together.

I had a unique iPhone 5 background that I had to use because of where certain graphic elements were placed on it, but I used the ultimate config.lua to create the content area.

Read that post, perhaps several times and try to digest it.

Rob

Hi Rob and Brent.

I’m going to submit for now for the iPad and the iPhone (even if I see the black border.)

I’m going to study a lot the dynamic image, Maybe for my next app I will be ready.

When I build in corona. I have a file – icon.png (57X57)

when I build for iPad… it gives me an error, --you need a 72X72 icon.png

Then I change the icon for 72X72 and build universal

and it gives me an error – you need icon.png 57X57 for iPhone

Then I change that for 57X57

and it gives me an error – you need icon 72X72 for iPad


It’s only 1 file name, if I have 52 – it wants 72 [-- if I have 72 – it wants 52]

What do I do?

Hi Victor,

You will need to create icons for all of the device(s) you want to support. These are listed here, in the “Custom App Icons” section:

http://docs.coronalabs.com/guide/distribution/buildSettings/index.html

Brent