Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

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

— asked May 1st 2010 by Dan Tamas
  • ipad
  • iphone
  • universal
0 Comments

5 Answers

  • I'd love to know this too.

    — answered May 1st 2010 by Dan Giulvezan
    permalink
    0 Comments
  • Me too. As the market is now, this is imperative.

    — answered May 2nd 2010 by Pedro B.
    permalink
    0 Comments
  • 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

    — answered May 18th 2010 by Phi Chong
    permalink
    0 Comments
  • @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.

    — answered May 18th 2010 by Dan Tamas
    permalink
    0 Comments
  • 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.

    — answered July 7th 2011 by Steven McGowan
    permalink
    0 Comments
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.