Open friedbunny opened 4 years ago
This seems to occur on iOS 13 on iPad where the viewDidLoad
is too late (ref)... A workaround for me was to add:
-(void)awakeFromNib {
[super awakeFromNib];
// The menu and example view controllers are displayed side-by-side onscreen.
self.splitViewController.preferredDisplayMode = UISplitViewControllerDisplayModeAllVisible;
}
When launching the app on iPad, our
UISplitViewController
defaults to showing the child view controller (i.e., the map/example), but this view controller does not load anything until an example is tapped in the primary (menu table view) controller.This means that UI tests aren’t able to start on iPad, because the elements it expects are not available.
We may need to fiddle with this property:
https://github.com/mapbox/ios-sdk-examples/blob/4dbe089786ef6b057954ffa72bec0b184b0c3ffb/Examples/ExamplesTableViewController.m#L47
Screenshots
Nothing loads initially
Rotating the screen a few times brings up the primary controller
/cc @captainbarbosa @julianrex @lloydsheng