When running on iPhone X with latest expo app, I need to add extra spacer to top and bottom… Is there any prefered way without detecting specific mobile device (iPhone X) based on model number / resolution + platform / … ?
We have time to find a solution I just looking for ideal solution without locking on device type table to decide… (but I think, that this will be the solution… just detect iPhone with notch and set special content spacers)…
I’ve been searching quite a bit and there’s no additional information on this. This works, but we can’t rely on it moving forward with new phones being released in the future.
Use SafeAreaView
and if you need height of top/bottom safe area, you can use: SafeAreaContext - Expo Documentation
This will allow you to access safe area values via SafeAreaConsumer or via useSafeArea hook.