Accessing page content when using deeply nested React Navigation navigators on iOS

Does anyone have any experience with React Navigation 5 on iOS and nested navigators?

It appears that once the navigation tree hits 5 nested navigators on iOS that instead of being able to access the current pages content it returns a single XCUIElementTypeOther element.

For instance if the navigation tree looks like
Stack -> Tab -> Stack -> Tab then the content tree is rendered correctly

But if there’s an extra level such as
Stack -> Tab -> Drawer -> Stack -> Tab then the content tree becomes that single XCUIElementTypeOther element

I had initial thought this could be down to not using the accessible prop correctly on the view containing the content (as this can cause similar behaviour) but after testing out a number of different nested navigation configurations and setting this prop on every view I believe it’s due to this.

I don’t have this issue on Android as the same structure works perfectly fine, is there just some config I’m missing?

3 Likes

I got same issue can’t access to screen’s content when nested stack navigator

Experiencing the same issue.
After developers used React Navigation 5 on iOS, I’m no longer seeing some of the elements in the Appium for desktop. Only parent XCUIElementTypeOther

I have fixed by re-structure my app to fix maximum nested stack navigator to 4.
But actually this solution is not a good way.

Does this mean that React Navigation v4 doesn’t have the same issue?