Status Bar on iOS Background Color

This worked for me:

  1. Run cordova plugin add https://github.com/apache/cordova-plugin-statusbar.git

  2. config.xml Add <preference name="StatusBarBackgroundColor" value="#" /> inside <platform name='ios'> tag

  3. index.html Add <meta name="viewport" content="viewport-fit=cover, initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width" />

  4. Save.

  5. Launch the simulator.

Screenshot of transparent statusbar


Okay so after referring to:

  • https://issues.apache.org/jira/browse/CB-12886 and
  • https://issues.apache.org/jira/browse/CB-12890

The issue occurs in iOS 11, and cordova-ios-4.5.0 and is simply solved by adding the cover value to viewport-fit as follows in your index.html:

   <meta name="viewport" content="viewport-fit=cover, initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width" />