question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

statusBarStyle has no effect on iOS 12

See original GitHub issue

Description

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

Simulator Screen Shot - iPhone 7 - 2020-12-17 at 11 44 09

Steps To Reproduce

  1. On a device/simulator with iOS 12, open the app
  2. Right away you’ll notice that the status bar text is white on white
  3. In App.js try changing the statusBarStyle from dark to light and vice-versa under screenOptions
  4. It won’t have any effect on iOS 12

Expected behavior

The configured style should be respected.

Snack or minimal code example

StatusBarRepro.zip

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:closed
  • Created 3 years ago
  • Comments:14 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
WoLewickicommented, Dec 21, 2020

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.

1reaction
WoLewickicommented, Dec 21, 2020

I added #757 with this change 🎉.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found