react-native-safe-area-context
react-native-safe-area-context copied to clipboard
Version > 4 not working on IOS
Hello,
I was updating the dependencies in my app recently and when I updated this dependency v3.4.1 to the latest version 4.1.4 the app is now rendering where the StatusBar is displayed in IOS. If I use the SafeAreaView provided by react-native then its working, but I would like to use this package because its supposed to support IOS and Android. Has anyone else had this issue?
Yeah I have had the same issue, did you find a workaround apart from switching back to the react-native SafeAreaView?
No, for now I am still using version 3.4.1 of react-native-safe-area-context. I'd like to see some sort of fix for IOS here, I don't see anything wrong with my setup/usage of the safe area context since it is working ok in the older version.
Try this https://github.com/th3rdwave/react-native-safe-area-context/issues/279#issuecomment-1159644248
You can try to wrap the SafeAreaView with SafeAreaProvider like this.
<SafeAreaProvider>
<SafeAreaView style={styles.container}>
...
</SafeAreaView>
</SafeAreaProvider>
It works for me in for both iOS 15 and Android 12.