Advice on how to make universal app (iphone ipad)
Does anybody have an advice on how to build an app that will run depending on what device is installed on, and how to specify this to titanium and appstore?
Thanks
5 Answers
-
I'd love to know this too.
-
Me too. As the market is now, this is imperative.
-
Any examples of this would be great.
The guy here suggests it's already possible
http://developer.appcelerator.com/question/14881/transform-app-to-universal-app-works-both-in-iphoneipod-touch-and-ipad
-
@phi
I saw this, and it crossed my mind that tis can be done.
My question is how to do this on the deployment moment , when you compile the application for the appstore. -
For those that are wondering how this is possible, what I have done is used an if statement. The API's provide a check for which version you are using by calling
Ti.Platform.name
Thus you can do something like:
if(Ti.Platform.name == 'android') { //Do android specific things } else { //iPhone and iPad specific. //Do iPhone and iPad specific things } //Do Code that is required for both operating systems.
I have just one warning:
Be careful about camera specific tasks as the iPad 1 does not have a camera and you have to distinguish between it and the iPhone/iPad 2.