Capacitor: Statusbar.setStyle does not work on iOS 13 with dark mode enabled

Created on 21 Sep 2019  路  2Comments  路  Source: ionic-team/capacitor

Description of the problem:

iOS 13 has been released and introduces the dark mode. After updating my device to iOS 13, I realized the StatusBar plugin from Capacitor stops working when dark mode is enabled. However the issue does not happen when dark mode is disabled, or on iOS < 13 and on Android (same codebase).

Affected platform

  • [ ] Android
  • [x] iOS
  • [ ] electron
  • [ ] web

OS of the development machine

  • [ ] Windows
  • [x] macOS
  • [ ] linux

Other information: Tested on iPhone X. The codebase has "UIViewControllerBasedStatusBarAppearance" enabled.

Capacitor version: 1.1.1

node version: 10.0.0

npm version: 6.10.2

CocoaPods version: 1.7.5

Steps to reproduce:
Use StatusBar.setStyle.

import {
  Plugins,
  StatusBarStyle,
} from '@capacitor/core'

StatusBar.setStyle({
        style: StatusBarStyle.Light
})
setTimeout(() => {
  StatusBar.setStyle({
          style: StatusBarStyle.Dark
  })
}, 3000)

Most helpful comment

I can confirm this issue also exists with Capacitor version 1.2.1.

The style seems to actually be applied (e.g., StatusBar.getInfo() returns {"visible":true,"style":"LIGHT"}), but the status bar text remains white.

All 2 comments

I can confirm this issue also exists with Capacitor version 1.2.1.

The style seems to actually be applied (e.g., StatusBar.getInfo() returns {"visible":true,"style":"LIGHT"}), but the status bar text remains white.

I also have the same problem.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Kepro picture Kepro  路  3Comments

mlynch picture mlynch  路  3Comments

gnesher picture gnesher  路  3Comments

peterpeterparker picture peterpeterparker  路  3Comments

stripathix picture stripathix  路  3Comments