Last Updated: February 25, 2016
·
404
· milesmatthias

Can't access the Ti.UI.iPhone functions on an iPad app?

Titanium's Ti.UI.iPhone functions won't be available in an iPad app unless you say in your project config that you support the iPhone portrait orientation. This is true even with the target device iphone set to false. Grr...

<iphone>
    <orientations device="iphone">
        <orientation>TI.UI.PORTRAIT</orientation>
    </orientations>
    <orientations device="ipad">
        <orientation>Ti.UI.LANDSCAPE_LEFT</orientation>
        <orientation>Ti.UI.LANDSCAPE_RIGHT</orientation>
    </orientations>
</iphone>
<deployment-targets>
    <target device="blackberry">false</target>
    <target device="android">false</target>
    <target device="ipad">true</target>
    <target device="iphone">false</target>
    <target device="mobileweb">false</target>
</deployment-targets>