Unable to find child elements of UIATableCell using iOS UIAutomation

Hi.

Appium 1.4
iOS 8.2
java bindings 2.2
I’m trying to do the following:

getDriver().findElement(MobileBy.IosUIAutomation("target.frontMostApp().mainWindow().tableViews()[0].cells()[0]")).findElement(MobileBy.IosUIAutomation(".staticTexts()"))

and it throws me a NoSuchElementException

however if I do the following:

getDriver().findElement(MobileBy.IosUIAutomation("target.frontMostApp().mainWindow().tableViews()[0].cells()[0].staticTexts()[0]"))

it works. Moreover if on the other screen I perform:

getDriver().findElement(MobileBy.IosUIAutomation("target.frontMostApp().mainWindow().scrollViews()[0].collectionViews()[0].cells()[0]")).findElement(MobileBy.IosUIAutomation(".staticTexts()"))

it works too (note that there is collectionView instead of tableView).

page dump

<UIAApplication name="SF-Client" label="SF-Client" value="" dom="" enabled="true" valid="true" visible="true" hint="" path="/0" x="0" y="24.125" width="375" height="642.1875">
    <UIAWindow name="" label="" value="" dom="" enabled="true" valid="true" visible="true" hint="" path="/0/0" x="0" y="0" width="375" height="667">
    </UIAWindow>
    <UIAWindow name="" label="" value="" dom="" enabled="true" valid="true" visible="true" hint="" path="/0/1" x="0" y="0.6875" width="375" height="665.625">
        <UIAButton name="menuButton" label="menuButton" value="" dom="" enabled="true" valid="true" visible="true" hint="" path="/0/1/0" x="11.71875" y="35.84375" width="24.609375" height="28.125">
        </UIAButton>
        <UIAButton name="Ini1" label="Ini1" value="" dom="" enabled="true" valid="true" visible="true" hint="" path="/0/1/1" x="70.3125" y="33.5" width="234.375" height="32.8125">
        </UIAButton>
        <UIAButton name="publishButton Snow" label="publishButton Snow" value="" dom="" enabled="true" valid="true" visible="true" hint="" path="/0/1/2" x="338.671875" y="37.015625" width="24.609375" height="25.78125">
        </UIAButton>
        <UIACollectionView name="" label="" value="page 1 of 1" dom="" enabled="true" valid="true" visible="true" hint="" path="/0/1/3" x="0" y="75.6875" width="375" height="50.390625">
            <UIACollectionCell name="PRIMARY" label="" value="1" dom="" enabled="true" valid="true" visible="true" hint="" path="/0/1/3/0" x="0" y="75.6875" width="187.5" height="50.390625">
                <UIAStaticText name="PRIMARY" label="PRIMARY" value="PRIMARY" dom="" enabled="true" valid="true" visible="true" hint="" path="/0/1/3/0/0" x="11.71875" y="88.578125" width="164.0625" height="25.78125">
                </UIAStaticText>
            </UIACollectionCell>
            <UIACollectionCell name="HIGHLIGHTED" label="" value="0" dom="" enabled="true" valid="true" visible="true" hint="" path="/0/1/3/1" x="187.5" y="75.6875" width="187.5" height="50.390625">
                <UIAStaticText name="HIGHLIGHTED" label="HIGHLIGHTED" value="HIGHLIGHTED" dom="" enabled="true" valid="true" visible="true" hint="" path="/0/1/3/1/0" x="199.21875" y="88.578125" width="164.0625" height="25.78125">
                </UIAStaticText>
            </UIACollectionCell>
        </UIACollectionView>
        <UIATableView name="" label="" value="rows 1 to 3 of 250" dom="" enabled="true" valid="true" visible="true" hint="" path="/0/1/4" x="0" y="126.078125" width="375" height="540.234375">
            <UIATableCell name="Express_ATX" label="" value="" dom="" enabled="true" valid="true" visible="true" hint="" path="/0/1/4/0" x="0" y="126.078125" width="375" height="143.12210083007812">
                <UIAStaticText name="Express_ATX" label="Express_ATX" value="Express_ATX" dom="" enabled="true" valid="true" visible="true" hint="" path="/0/1/4/0/0" x="76.171875" y="137.796875" width="205.078125" height="18.75">
                </UIAStaticText>
                <UIAStaticText name="TWEET_58277 http://t.co/6DwheW8QY2" label="TWEET_58277 http://t.co/6DwheW8QY2" value="TWEET_58277 http://t.co/6DwheW8QY2" dom="" enabled="true" valid="true" visible="true" hint="" path="/0/1/4/0/1" x="76.171875" y="161.234375" width="287.109375" height="44.684600830078125">
                </UIAStaticText>
                <UIAStaticText name="13m" label="13m" value="13m" dom="" enabled="true" valid="true" visible="true" hint="" path="/0/1/4/0/2" x="285.9375" y="137.796875" width="70.3125" height="14.0625">
                </UIAStaticText>
                <UIAButton name="cellReplyButton" label="inbox icn reply" value="" dom="" enabled="true" valid="true" visible="true" hint="" path="/0/1/4/0/3" x="70.3125" y="216.3125" width="51.5625" height="51.5625">
                </UIAButton>
                <UIAButton name="" label="" value="" dom="" enabled="false" valid="false" visible="false" hint="" path="/0/1/4/0/4" x="0" y="0" width="0" height="0">
                </UIAButton>
                <UIAButton name="" label="" value="" dom="" enabled="false" valid="false" visible="false" hint="" path="/0/1/4/0/5" x="0" y="0" width="0" height="0">
                </UIAButton>
                <UIAButton name="" label="" value="" dom="" enabled="false" valid="false" visible="false" hint="" path="/0/1/4/0/6" x="0" y="0" width="0" height="0">
                </UIAButton>
                <UIAButton name="" label="" value="" dom="" enabled="false" valid="false" visible="false" hint="" path="/0/1/4/0/7" x="0" y="0" width="0" height="0">
                </UIAButton>
            </UIATableCell>
            <UIATableCell name="" label="" value="0" dom="" enabled="false" valid="false" visible="false" hint="" path="/0/1/4/1" x="0" y="0" width="0" height="0">
            </UIATableCell>
            <UIATableCell name="" label="" value="0" dom="" enabled="false" valid="false" visible="false" hint="" path="/0/1/4/2" x="0" y="0" width="0" height="0">
            </UIATableCell>
            <UIATableCell name="" label="" value="0" dom="" enabled="false" valid="false" visible="false" hint="" path="/0/1/4/3" x="0" y="0" width="0" height="0">
            </UIATableCell>                
        </UIATableView>
        <UIAScrollView name="" label="" value="" dom="" enabled="true" valid="true" visible="false" hint="" path="/0/1/5" x="0" y="666.3125" width="375" height="2.34375">
            <UIAImage name="" label="" value="" dom="" enabled="true" valid="true" visible="false" hint="" path="/0/1/5/0" x="372.0703125" y="626.46875" width="2.9296875" height="42.1875">
            </UIAImage>
            <UIAImage name="" label="" value="" dom="" enabled="true" valid="true" visible="false" hint="" path="/0/1/5/1" x="0" y="665.7265625" width="375" height="2.9296875">
            </UIAImage>
        </UIAScrollView>
        <UIANavigationBar name="SFSocialInboxView" label="" value="" dom="" enabled="true" valid="true" visible="false" hint="" path="/0/1/6" x="0" y="-74.3125" width="375" height="51.5625">
            <UIAImage name="" label="" value="" dom="" enabled="true" valid="true" visible="false" hint="" path="/0/1/6/0" x="0" y="-97.75" width="375" height="75">
                <UIAImage name="" label="" value="" dom="" enabled="true" valid="true" visible="false" hint="" path="/0/1/6/0/0" x="0" y="-22.75" width="375" height="0.5859375">
                </UIAImage>
            </UIAImage>
            <UIAButton name="Back" label="Back" value="" dom="" enabled="true" valid="true" visible="false" hint="" path="/0/1/6/1" x="9.375" y="-60.8359375" width="24.609375" height="24.609375">
            </UIAButton>
        </UIANavigationBar>
    </UIAWindow>
    <UIAWindow name="" label="" value="" dom="" enabled="true" valid="true" visible="false" hint="" path="/0/2" x="0" y="0.6875" width="375" height="665.625">
    </UIAWindow>
    <UIAWindow name="" label="" value="" dom="" enabled="true" valid="true" visible="true" hint="" path="/0/3" x="0" y="0.6875" width="375" height="665.625">
        <UIAStatusBar name="" label="" value="" dom="" enabled="true" valid="true" visible="true" hint="" path="/0/3/0" x="0" y="0.6875" width="375" height="23.4375">
            <UIAElement name="Swipe down with three fingers to reveal the notification center., Swipe up with three fingers to reveal the control center, Double-tap to scroll to top" label="" value="" dom="" enabled="true" valid="true" visible="true" hint="Swipe down with three fingers to reveal the notification center., Swipe up with three fingers to reveal the control center, Double-tap to scroll to top" path="/0/3/0/0" x="7.03125" y="0.6875" width="44.53125" height="23.4375">
            </UIAElement>
            <UIAElement name="3 of 3 Wi-Fi bars" label="3 of 3 Wi-Fi bars" value="" dom="" enabled="true" valid="true" visible="true" hint="Swipe down with three fingers to reveal the notification center., Swipe up with three fingers to reveal the control center, Double-tap to scroll to top" path="/0/3/0/1" x="57.421875" y="0.6875" width="15.234375" height="23.4375">
            </UIAElement>
            <UIAElement name="" label="" value="" dom="" enabled="false" valid="false" visible="false" hint="" path="/0/3/0/2" x="0" y="0" width="0" height="0">
            </UIAElement>
            <UIAElement name="5:34 AM" label="5:34 AM" value="" dom="" enabled="true" valid="true" visible="true" hint="Swipe down with three fingers to reveal the notification center., Swipe up with three fingers to reveal the control center, Double-tap to scroll to top" path="/0/3/0/3" x="160.546875" y="0.6875" width="55.078125" height="23.4375">
            </UIAElement>
            <UIAElement name="" label="" value="" dom="" enabled="false" valid="false" visible="false" hint="" path="/0/3/0/4" x="0" y="0" width="0" height="0">
            </UIAElement>
            <UIAElement name="100% battery power" label="100% battery power" value="" dom="" enabled="true" valid="true" visible="true" hint="Swipe down with three fingers to reveal the notification center., Swipe up with three fingers to reveal the control center, Double-tap to scroll to top" path="/0/3/0/5" x="339.84375" y="0.6875" width="29.296875" height="23.4375">
            </UIAElement>
        </UIAStatusBar>
    </UIAWindow>
    <UIAWindow name="" label="" value="" dom="" enabled="true" valid="true" visible="false" hint="" path="/0/4" x="0" y="-0.1181640625" width="375" height="665.625">
        <UIAEditingMenu name="" label="" value="" dom="" enabled="true" valid="true" visible="false" hint="" path="/0/4/0" x="0" y="1.4931640625" width="0" height="0">
            <UIAImage name="" label="" value="" dom="" enabled="true" valid="true" visible="false" hint="" path="/0/4/0/0" x="0" y="1.4931640625" width="0" height="0">
            </UIAImage>
            <UIAImage name="" label="" value="" dom="" enabled="true" valid="true" visible="false" hint="" path="/0/4/0/1" x="0" y="1.4931640625" width="0" height="0">
            </UIAImage>
            <UIAImage name="" label="" value="" dom="" enabled="true" valid="true" visible="false" hint="" path="/0/4/0/2" x="0" y="1.4931640625" width="0" height="0">
            </UIAImage>
            <UIAElement name="Show previous items" label="Show previous items" value="" dom="" enabled="true" valid="true" visible="false" hint="" path="/0/4/0/3" x="0" y="1.4931640625" width="0" height="0">
            </UIAElement>
            <UIAElement name="Show more items" label="Show more items" value="" dom="" enabled="true" valid="true" visible="false" hint="" path="/0/4/0/4" x="0" y="1.4931640625" width="0" height="0">
            </UIAElement>
        </UIAEditingMenu>
    </UIAWindow>
</UIAApplication>

well this is probably related to the specific UI implementation. First findElement causes the loading that prevents the second findElement from working correctly

Where can I find examples of the iOS UiAutomation() code that goes inside. Appium documentation is horrible for iOS! And its all web based not app based.