brunocodutra/webapp-webpack-plugin

apple-mobile-web-app-status-bar-style

firsttris opened this issue · 8 comments

Hello,

since the latest iOS update my webapp only shows a white status bar in iOS.

is there an option to create a black status bar instead of black-translucent?

< meta name="apple-mobile-web-app-status-bar-style" content="black" >

regards
Tristan

Did you try setting theme_color in favicons options?

yes i did try set it to
favicons: {
theme_color: "#000",
}

but no change
img_0630

but if i change
< meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" >
to
< meta name="apple-mobile-web-app-status-bar-style" content="black" >

i get the status bar back.

I believe theme_color should accept black-translucent, have you tried that?

yes

i tried setting it to
black
black-translucent
#000

but my iOS Status Bar is still white.

it will always generate
< meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" >

but if i change it to
< meta name="apple-mobile-web-app-status-bar-style" content="black" >

i get the status bar back

Oh so I got it the other way around, you want it to be black but it's always translucent.
The reason for that odd behaviour seems to be due to this line in favicons.
I believe this property should be set to theme_color around this line, but apparently it is not.

I created a follow up ticket against favicons, see itgalaxy/favicons#230

I've found a plugin which works around this limitation: https://github.com/invalidred/AppleStatusBarStyleWebpackPlugin
Of course, it would be nice if there would be an option in favicons to set this property instead of using another plugin to just do that.

you can also do this with htmlwebpackplugin but then you would have 2 meta tags

This feature has shipped with Favicons v5.2