viewDidLayoutSubviews methodThe Mapbox should not invalidate the parent view's layout and cause viewDidLayoutSubviews to fire, so no log should be seen from step #3 above.
The Mapbox seems to be invalidating the entire view hierarchy and causing viewDidLayoutSubviews to fire with every rotation - even though only portrait mode is allowed. Please see the following GitHub issue that highlights a possible problem this could cause with compatibility with other libraries: Pulley Issue #307. In particular, see this comment.
Mapbox SDK versions: 4.8.0
iOS/macOS versions: 12.1.2
Device/simulator models:
Xcode version: 10.1
cc: @chloekraw
Thanks @ksinghal - it looks like we layout subviews on each device rotation, regardless of how the application has defined its supported orientations.
See https://github.com/mapbox/mapbox-gl-native/pull/13900 for a quick experiment.
Fixed in #13900
Most helpful comment
Fixed in #13900