Specify launch device

Hi everybody,

How can I specify in the build.settings file that my app can only be launched in an iPad Retina?

Thanks [import]uid: 57891 topic_id: 35610 reply_id: 335610[/import]

There are a few things you can do like requiring a front facing camera to limit your app from iPods or older phones/iPad1’s. But I don’t know of a way to eliminate iPad 2’s from the mix. All the things you can test for, like a gyroscope and such are present in both devices.

Is there a reason you want to eliminate the quite popular (and still selling) iPad2? [import]uid: 199310 topic_id: 35610 reply_id: 141621[/import]

Well, the reason is that I have two versions of my app (one for the retina-ipads and other for the non-retina ipads) because I had troubles scalling the content and I need to delimitate in some way the devices that can access to each of the versions.

So if you know how can I do that, please let me know.

Lots of thanks,
Borja [import]uid: 57891 topic_id: 35610 reply_id: 141642[/import]

I doubt that Apple is going to let you have two versions of the same app with one being for Retina displays and one for non-ones.

If you need help scaling the content, let the community help you hear in the forums. There are several blog posts on the subject and quite a few forum posts that you can google to find if you want to research on your own, but asking here, letting us know what your problem is and the community and the staff will try to help you.
[import]uid: 199310 topic_id: 35610 reply_id: 141797[/import]

Well, the main problem I have is that when I use displayNewImageRect, so that Corona is able to auto scale the images when the app is being run on a retina ipad, all the screen’s content appears scaled down and misplaced.

In the config.lua I’ve specified a width of 768 pixels, a height of 1024 pixels and the letterBox scale. Also I have this imageSuffix defined:

imageSuffix = {
["@2x"] = 2,
}"

And in my project document’s directory I have both .png and @2.png image files.

[import]uid: 57891 topic_id: 35610 reply_id: 141861[/import]

are your files @2**x
It has to match what you put in your config.lua. This auto scaling should load higher resolution images on the retina iPads for you.

[import]uid: 199310 topic_id: 35610 reply_id: 141914[/import]**

Yes, my retina files are @2x, I don’t know were’s the problem [import]uid: 57891 topic_id: 35610 reply_id: 142245[/import]

I may not have asked my question correctly. Are you images named:

filename @2x.png

or

filename @2.png

Can you also post a sample of code where you’re loading your images?

[import]uid: 199310 topic_id: 35610 reply_id: 142248[/import]

There are a few things you can do like requiring a front facing camera to limit your app from iPods or older phones/iPad1’s. But I don’t know of a way to eliminate iPad 2’s from the mix. All the things you can test for, like a gyroscope and such are present in both devices.

Is there a reason you want to eliminate the quite popular (and still selling) iPad2? [import]uid: 199310 topic_id: 35610 reply_id: 141621[/import]

Well, the reason is that I have two versions of my app (one for the retina-ipads and other for the non-retina ipads) because I had troubles scalling the content and I need to delimitate in some way the devices that can access to each of the versions.

So if you know how can I do that, please let me know.

Lots of thanks,
Borja [import]uid: 57891 topic_id: 35610 reply_id: 141642[/import]

I doubt that Apple is going to let you have two versions of the same app with one being for Retina displays and one for non-ones.

If you need help scaling the content, let the community help you hear in the forums. There are several blog posts on the subject and quite a few forum posts that you can google to find if you want to research on your own, but asking here, letting us know what your problem is and the community and the staff will try to help you.
[import]uid: 199310 topic_id: 35610 reply_id: 141797[/import]

Well, the main problem I have is that when I use displayNewImageRect, so that Corona is able to auto scale the images when the app is being run on a retina ipad, all the screen’s content appears scaled down and misplaced.

In the config.lua I’ve specified a width of 768 pixels, a height of 1024 pixels and the letterBox scale. Also I have this imageSuffix defined:

imageSuffix = {
["@2x"] = 2,
}"

And in my project document’s directory I have both .png and @2.png image files.

[import]uid: 57891 topic_id: 35610 reply_id: 141861[/import]

are your files @2**x
It has to match what you put in your config.lua. This auto scaling should load higher resolution images on the retina iPads for you.

[import]uid: 199310 topic_id: 35610 reply_id: 141914[/import]**

My images are named filename@2x.png. For example, one of images is cloud.png (the non-retina file) and the retina file is named cloud@2x.png.

When I load the images I write:

local cloud = display.newImageRect( “cloud.png”, 100, 100 )

is that sintax correct?

Thanks for your help,
Borja [import]uid: 57891 topic_id: 35610 reply_id: 142783[/import]

That is the right syntax for the display.newImageRect() call assuming your image is 100x100 in size. I guess the other thing would be to post your config.lua and let us look for issues, because this scaling does work. [import]uid: 199310 topic_id: 35610 reply_id: 142812[/import]

Yes, my retina files are @2x, I don’t know were’s the problem [import]uid: 57891 topic_id: 35610 reply_id: 142245[/import]

I may not have asked my question correctly. Are you images named:

filename @2x.png

or

filename @2.png

Can you also post a sample of code where you’re loading your images?

[import]uid: 199310 topic_id: 35610 reply_id: 142248[/import]

My images are named filename@2x.png. For example, one of images is cloud.png (the non-retina file) and the retina file is named cloud@2x.png.

When I load the images I write:

local cloud = display.newImageRect( “cloud.png”, 100, 100 )

is that sintax correct?

Thanks for your help,
Borja [import]uid: 57891 topic_id: 35610 reply_id: 142783[/import]

That is the right syntax for the display.newImageRect() call assuming your image is 100x100 in size. I guess the other thing would be to post your config.lua and let us look for issues, because this scaling does work. [import]uid: 199310 topic_id: 35610 reply_id: 142812[/import]

Rob finally I have solved the problem. I had mistyped one part of the code in the config.lua file.

Lots of thanks for your help! [import]uid: 57891 topic_id: 35610 reply_id: 143967[/import]