watchOS 5 contentSafeAreaInsets always zero

478 views Asked by At

I might be missing something super obvious, but running an app compiled against watchOS 5 on the Apple Watch Series 4 simulator always results in the contentSafeAreaInsets and systemMinimumLayoutMargins returning zero (zero for left/right/top/bottom).

I've tried creating a sample project in case it was something weird in my app, but no luck.

The docs state:

The system’s built-in containers and controls automatically use the content-safe area insets; however, if you build a custom user interface with SpriteKit or SceneKit, you should check the contentSafeAreaInsets and systemMinimumLayoutMargins, and lay out your interface accordingly.

So I've tried adding a SceneKit scene to the Storyboard but that's had no effect, even when launching all permutations of the "full screen" and "fixed to screen edges" options enabled and disabled:

enter image description here

Edit: If I background and foreground the app the values are reported successfully, which makes me believe this could be a bug in watchOS if there's no workaround. It seems unreasonable to expect a user to background and foreground an app to get the correct behaviour.

0

There are 0 answers