Statusbar is black on ipad

  • 1
  • Problem
  • Updated 4 years ago
I have read a lot of articles related to status bar. I made it working. It works fine on iPhone, but on iPad I see only black line. It is same size as status bar should be but with no data.
Same IOS 9.3.2 on both devices
Photo of Alexey Korsakov

Alexey Korsakov

  • 5 Posts
  • 0 Reply Likes

Posted 4 years ago

  • 1
Photo of Petra V.

Petra V., Champion

  • 7794 Posts
  • 1391 Reply Likes
Did you include the statusbar plugin from npm?
I made it working.
How?
Photo of Alexey Korsakov

Alexey Korsakov

  • 5 Posts
  • 0 Reply Likes

<plugin name="cordova-plugin-statusbar" version="1" />
<feature name="StatusBar">
<param name="ios-package" value="CDVStatusBar" onload="true" />
</feature>


and

document.addEventListener("deviceready", onDeviceReady, false);
...
Photo of Petra V.

Petra V., Champion

  • 7794 Posts
  • 1391 Reply Likes
1. You can't use the feature element with Phonegap Build. It's obsolete and should be removed from your config.

2. Version "1" of the statusbar plugin doesn't exist. I'd suggest you remove the version attribute completely.

3. Adding an eventlistener to the document element doesn't do anything in itself. So, it would be more interesting to see what code against the statusbar plugin's interface you included in the eventlistener's callback function.
Photo of Alexey Korsakov

Alexey Korsakov

  • 5 Posts
  • 0 Reply Likes
ok... I did as you suggested, now I have black line on both devices

Callback function is simple

function onDeviceReady() {
StatusBar.overlaysWebView(false);
}
Photo of Petra V.

Petra V., Champion

  • 7794 Posts
  • 1391 Reply Likes
Good. So at least it changes something.
Now, the question is: where do you set the statusbar text or background color to black? Do you have any such entries in your config or your javascript code?
Photo of Alexey Korsakov

Alexey Korsakov

  • 5 Posts
  • 0 Reply Likes
in config.xml

<preference name="StatusBarBackgroundColor" value="#000000" />
<preference name="StatusBarStyle" value="lightcontent" />
Photo of Petra V.

Petra V., Champion

  • 7794 Posts
  • 1391 Reply Likes
So, why don't you try removing the backgroundcolor first? After that, you can play with either settings to set it to your likings.
Photo of Alexey Korsakov

Alexey Korsakov

  • 5 Posts
  • 0 Reply Likes
Great! Thank you