Status Bar Dark Content Not Working On iOS 13 Dark Mode
See original GitHub issueReact Native version: 0.60.0
Steps To Reproduce
- StatusBar.setBarStyle(‘dark-content’); // Not Working
Issue Analytics
- State:
- Created 4 years ago
- Reactions:35
- Comments:25 (2 by maintainers)
Top Results From Across the Web
How do I prevent iOS 13's Dark Mode from changing the text ...
I'm guessing your solution has the same problem I'm experiencing (black status bar text in light mode; white status bar text in dark...
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 >React Native StatusBar dark-content not working on iOS 13 ...
QuestionReact Native 0.60.5 . Light mode in iOS 13 or earlier versions is normal. However, there is no effect in iOS 13 Dark...
Read more >How to always display dark text in the status bar of an iOS ...
In applications with a white form background, dark mode sets the status bar text color to white, resulting in the text no longer...
Read more >Implementing Dark Mode in iOS 13
After years of waiting and anticipation, iOS 13 finally supports native Dark Mode! Users can choose to enable a system wide dark appearance...
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 Free
Top 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
I solved the problem.
Apple has added a new constant to the status bar with the latest update, so dark-content doesn’t work. (in dark-mode)
https://developer.apple.com/documentation/uikit/uistatusbarstyle?language=objc
New Constant: UIStatusBarStyleDarkContent - A dark status bar, intended for use on light backgrounds.
Open XCode
Search: RCTStatusBarManager.m
Pods/Development Pods/React-Core/Modules/RCTStatusBarManager.m (xCode)
Other Editor node_modules/react-native/React/RCTStatusBarManager.m
To Change:
As a workaround you could probably update the following keys in the
Info.plist
file, overriding the system dark mode: