Add UIRequiredDeviceCapabilities to your Titanium Project

Need to see the UIRequiredDeviceCapabilities for your Titanium mobile project?  This has been easy in the past through using a custom Info.plist file.

The latest release of Titanium makes this even easier by allow you to device your UIRequiredDeviceCapabilities directly in your tiapp.xml file.  For many projects this removes the need to use a custom Info.plist file all together.

Adding UIRequiredDeviceCapabilities to tiapp.xml

  1. In Titanium Studio click on your project’s tiapp.xml file
  2. Press the tiapp.xml option at the bottom of the screen so you can see the file’s xml layout
  3. Find your project’s <iphone>section
  4. Add a <requires> node into your <iphone>section
  5. Within the <requires> section add <feature> nodes for each required UIRequiredDeviceCapabilities.  For example <feature>sms</feature> would require the device has sms capabilities.

See below for an example:









During the build process Titanium will include any valid device capabilities into the Info.plist file it generates for you.  The above example could require your device target to have telephony, sms, and wifi capabilities.  Any invalid entries will be discarded. In the above example the “foo” value would be skipped.

Tip – When using this feature for the first time, make sure to clean your project before building.

What feature can I required?

For a full list of UIRequiredDeviceCapabilities values please read Apple’s documentation here.

Leave a Reply

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

You are commenting using your 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