How do you detect if the device is an iPad?
system.getInfo(“platformName”) or “model”?
Thanks. [import]uid: 1560 topic_id: 3111 reply_id: 303111[/import]
if system.getInfo( "model" ) == "iPad" then
-- Show HD version
end
[import]uid: 8196 topic_id: 3111 reply_id: 9101[/import]
I thought you had to build the binary specifically for iPad or iPhone OS, so something like the above would be moot point, no? Now I’m confused.
-Mark [import]uid: 9189 topic_id: 3111 reply_id: 9183[/import]
Hi Mark,
If you’re only building an app for iPad only then you’re right, it is a moot point. Your code can assume an iPad environment. But if you want to build the same app (that is, from the same source code) for iPhone and iPad, then these types of checks can help you customize the app’s behavior at runtime according to the device.
Tim [import]uid: 8196 topic_id: 3111 reply_id: 9189[/import]
Speaking of iPad builds, what’s the general practice for doing different builds with regard to images?
The iPad requires a different size icon file than the iPhone yet both default to “icon.png,” which would seem to require separate folders for each build, one with a 57x57 icon and one with a 72x72 icon. Are most people just maintaining separate folders for each target platform?
Wouldn’t it be better to be able to include/exclude specific files in a single folder during builds, rather than doing each build from a mostly duplicate set of files? Is anything like that planned? [import]uid: 1560 topic_id: 3111 reply_id: 9201[/import]