Friday, May 3, 2013

Mobile App Development with Titanium - plist entries

In the past whenever I have wanted to modify a plist entry for a titanium app, it has involved building the app and then copying back the info.plist file from the build folder into my project root.  I discovered today that you can simply edit the tiapp.xml with the plist dictionary items you need.  The following is an example for adding custom fonts in iOS



<ios>
    <plist>
        <dict>
            <key>UIAppFonts</key>
            <array>
                <string>fonts/Handlee-Regular.ttf</string>
                <string>fonts/Oswald-Bold.ttf</string>
                <string>fonts/Oswald-Light.ttf</string>
                <string>fonts/Oswald-Regular.ttf</string>
            </array>
        </dict>
    </plist>
</ios>