Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Color iPhone status bar incorrect when comparing direct browser install and store install #4839

Open
ncpunt opened this issue Oct 25, 2024 · 10 comments

Comments

@ncpunt
Copy link

ncpunt commented Oct 25, 2024

What happened?

When I install the PWA directly in Safari, the color of the status bar is correct. However, when I install the (PWA packaged) app from the App Store, the status bar is simpy, white.

image

How do we reproduce the behavior?

Try any color

What do you expect to happen?

Safari install and Store install should yield same theme colors

What environment were you using?

iPhone 12 with iOS 18

Additional context

No response

@maiconcarraro
Copy link
Contributor

What you mean by "try any color"? If you can provide exactly what you are referring to, and double check your "All settings" before exporting the iOS package, it may be showing white because of Status bar color field:
image

@ncpunt
Copy link
Author

ncpunt commented Oct 28, 2024

By any color I mean any color except white. My point is that I would expect PWABuilder to pickup the correct color from the manifest.json file.

"theme_color": "#111943"

The browser does this correctly as shown in my example. It would be nice if PWABuilder would use the manifest "theme_color" as its value for "status bar color". In that way the result would be the same.

@maiconcarraro
Copy link
Contributor

@ncpunt it does:

splashColor: manifest.background_color || "#ffffff",
progressBarColor: manifest.theme_color || "#000000",
statusBarColor:
manifest.theme_color || manifest.background_color || "#ffffff",

did you update your manifest after generating the ios project? if you can share your url for debug,

as example, if you try spotify link it automatically sets the colors:
image

image

@ncpunt
Copy link
Author

ncpunt commented Oct 28, 2024

Yes, it picks the color up from the manifest, but it does not apply it.

I went through the whole process again. Below the iOS Package settings.

PackSet

En here the result. Still white status bar.

AppRun

@maiconcarraro
Copy link
Contributor

@ncpunt got it, I don't have full context on this setting, I did see in the code it may have a different behavior based on adaptiveUIStyle flag, if you check your Settings.swift, can try to disable it?

cc @khmyznikov in case you know what is

@ncpunt
Copy link
Author

ncpunt commented Oct 29, 2024

I tried both adaptiveUIStyle and overrideStatusBar, without the desired effect.

let adaptiveUIStyle = false /*true*/     // iOS 15+ only. Change app theme on the fly to dark/light related to WebView background color.
let overrideStatusBar = true  /*false*/  // iOS 13-14 only. if you don't support dark/light system theme.

Copy link
Contributor

This issue has been marked as "needs attention 👋" since it has not been triaged for 7 days. Please triage the issue .

Copy link
Contributor

This issue has been marked as "needs attention 👋" since it has not been triaged for 7 days. Please triage the issue .

2 similar comments
Copy link
Contributor

This issue has been marked as "needs attention 👋" since it has not been triaged for 7 days. Please triage the issue .

Copy link
Contributor

This issue has been marked as "needs attention 👋" since it has not been triaged for 7 days. Please triage the issue .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants