Setting the Minimum iOS Version for your Titanium Project

With Appcelerator’s release of Titanium SDK 2.1.2 you can now specify the minimum iOS version in your tiapp.xml file.  This is a big step forward in managing all of your cross platform configurations in one file.  For me this has removed the latest need for a custom plist,

Just add the min-ios-ver node to the ios configuration section in your project’s tiapp.xml.  The below example sets a minimum iOS SDK level to 5.0.

<ios>
    <min-ios-ver>5.0</min-ios-ver>
    <plist>
        <dict>
            <key>UIPrerenderedIcon</key>
            <true/>
            <key>UIStatusBarStyle</key>
            <string>UIStatusBarStyleBlackTranslucent</string>
            <key>UISupportedInterfaceOrientations</key>
            <array>
                <string>UIInterfaceOrientationPortrait</string>
                <string>UIInterfaceOrientationPortraitUpsideDown</string>
            </array>
        </dict>
    </plist>
</ios>

This has streamlined the deployment process for me both via Titanium Studio and Transport.py.

About these ads
1 comment
  1. One important thing to note about the new min-ios-ver setting: it does not change the build architectures of your application. Why would you care about that? Some modules are only built for i386 and armv7, not armv6, so if you use those modules in your project, you will get a linker error. Also, if you plan on deploying to iOS 4.3 and later devices, you don’t need the armv6 architecture at all, so you can trim the app size a bit by excluding that architecture.

    Appcelerator is already tracking this problem in JIRA; follow these issues to keep up to date on improvements in the build scripts:

    https://jira.appcelerator.org/browse/TIMOB-9932
    https://jira.appcelerator.org/browse/TIMOB-9632

    If you need to remove armv6 today, I you can follow the instructions for editing the SDK templates that I posted on Github for users of my CouchDB module, TiTouchDB (which is i386/armv7 only):

    https://github.com/pegli/ti_touchdb/wiki

    Happy coding!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 723 other followers

%d bloggers like this: