Can we dynamically change the status bar (the one at the top) color in iOS for PWA apps? I am using Angular and I have been trying to modify the apple-mobile-web-app-status-bar-style meta tag during runtime but it seems like it doesn t work.
this.meta.removeTag("name= apple-mobile-web-app-status-bar-style ");
if (isDarkMode) {
this.bodyElement.style.setProperty( --mainPageBackground , #000 );
this.bodyElement.style.setProperty( --mainTextColor , #FFF );
this.meta.updateTag({ name: apple-mobile-web-app-status-bar-style , content: `black-translucent` }, `name= apple-mobile-web-app-status-bar-style `);
}
else {
this.bodyElement.style.setProperty( --mainPageBackground , #FFF );
this.bodyElement.style.setProperty( --mainTextColor , #000 );
this.meta.updateTag({ name: apple-mobile-web-app-status-bar-style , content: `default` }, `name= apple-mobile-web-app-status-bar-style `);
}