statusBarStyle has no effect on iOS 12
See original GitHub issueDescription
I observed that when setting the statusBarStyle
it has no effect at all on iOS 12. On newer versions of iOS that’s working nicely, I checked on 13 and 14 too.
I’m attaching a repro with the same setup as I’m using on my project. To setup the project I followed the react navigation instructions, and also https://github.com/software-mansion/react-native-screens/tree/master/native-stack#status-bar-managment to be able to configure the status bar.
Screenshots
Steps To Reproduce
- On a device/simulator with iOS 12, open the app
- Right away you’ll notice that the status bar text is white on white
- In App.js try changing the
statusBarStyle
from dark to light and vice-versa underscreenOptions
- It won’t have any effect on iOS 12
Expected behavior
The configured style should be respected.
Snack or minimal code example
Package versions
"@react-native-community/masked-view": "^0.1.10",
"@react-navigation/native": "^5.8.10",
"react": "16.13.1",
"react-native": "0.63.4",
"react-native-gesture-handler": "^1.9.0",
"react-native-reanimated": "^1.13.2",
"react-native-safe-area-context": "^3.1.9",
"react-native-screens": "^2.16.1"
Issue Analytics
- State:
- Created 3 years ago
- Comments:14 (6 by maintainers)
Top Results From Across the Web
preferredStatusBarStyle var not working in iOS12?
In a navigation controller situation, the color of the status bar is not determined by the view controller's preferredStatusBarStyle . It is ...
Read more >Status bar stays black even when set to light - Apple Developer
- as of iOS 7, the light / dark refers to the *text*, not the background, of the status bar. The bar itself...
Read more >Status Bar Capacitor Plugin API
The StatusBar API Provides methods for configuring the style of the Status Bar, along with showing or hiding it.
Read more >How To Change The Status Bar Style | iOS 13+ | Xcode 11+
Learn on Ray Wenderlich: https://store.raywenderlich.com/a/36157/link/1Sean Allen courses 15% off: ...
Read more >Further Recommendations on the MABS 4.0 Viewport-Fit ...
... known issue about the "viewport-fit" meta tag in iPhones running iOS 12. ... The following images show a mobile app with and...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
It would have been closed automatically when #757 is merged, so technically it would be better to leave this open for other users to comment and maybe find some mistakes. But don’t worry, it is not a problem. I will reopen this.
I added #757 with this change 🎉.