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.

iOS Statusbarstyle not set

See original GitHub issue

Description of the problem:

The statusbar style light is not set correctly. The statusbar is still displayed as dark on iOS if the style is set to light.

Affected platform

  • Android
  • iOS
  • electron
  • web

OS of the development machine

  • Windows
  • macOS
  • linux

Other information:

Capacitor version: 1.1

node version: 12

npm version: 6.9

Steps to reproduce:

    if (Capacitor.isPluginAvailable('StatusBar')) {
      StatusBar.setStyle({ style: StatusBarStyle.Light });
      StatusBar.show();
    }

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
jcesarmobilecommented, Jun 24, 2019

Just checked and it’s working as documented. It’s true that StatusBarStyle.Light might be counterintuitive for iOS users as it sets the native value to default, and StatusBarStyle.Dark to lightContent, but Android works the other way around, so, as we want both platforms to behave the same way, we choose the Android behavior this time. Changing this to behave like iOS will be a breaking change and users used to Android behavior might complain then as it should be changed for both platforms. So we are keeping current behavior.

// Light text for dark backgrounds.
Dark: "DARK"
// Dark text for light backgrounds.
Light: "LIGHT"

0reactions
danielsoglcommented, Jun 24, 2019

Thanks for your explanation. Not it is clear for me how to configure the plugin correctly.

Read more comments on GitHub >

github_iconTop Results From Across the Web

iOS 13 Status bar style invalid (childForStatusBarStyle never ...
UPDATE: Since iOS 13 released status has style based on UserInterfaceStyle set global, not based on preferredStatusBarStyle (with proper setup) ...
Read more >
iOS15 Status bar style not fixed | Apple Developer Forums
Occurs when the screen is in light mode, but works fine in dark mode and notch screens. There was no problem up to...
Read more >
How to set status bar style - Sarunw
Open you Info.plist. · Add View controller-based status bar appearance key ( UIViewControllerBasedStatusBarAppearance ) and set value to No ( ...
Read more >
cordova-plugin-statusbar
The StatusBar object provides some functions to customize the iOS and Android ... If this value is not set, the background color will...
Read more >
iOS Statusbar: not showing icons - Fuse Community
I rebuilt my app after two years for iOS using Fuse X 2.0 beta 10. With the recent Fuse improvements now it's possible...
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