Live Activity Dark mode issue with `.activityBackgroundTint(_:)`

Hello, i am implementing Live Activity and facing a problem setting custom color for widget background. I have a dedicated catalogue of colors for WidgetExtension each having light/dark variant.

The problem is, however, that widget's view changes color variants (any/dark) according to system settings, but not system background & text of widget set via .activityBackgroundTint(_:) and activitySystemActionForegroundColor(_:)

Both widget background and system button texts remain in light variant no matter what system setting was when starting Live Activity.

Later, i was able to kinda force LA background color by checking color scheme in my widget view (yellow and brown for test purposes)

.activityBackgroundTint(colorScheme == .light ? Color.surface. : Color.brown)

this would force Live Activity background to have expected color from start.

BUT

when i later change appearance in system settings Live Activity behaves weirdly, as if it was caching previous color I provided.

I installed 16.2 beta in hope that it was fixed, but noticed this behaviour 👇

system in light mode: LA start, LA background is light

set system to dark: LA background light

set system to light: LA background dark ❗️

set system to dark: do not pull notification center, do not look at LA, instead immediately 👇

set system to light: LA background light

Is there any way around this? 🙏

I have same issue.

Same issue.

Same issue, still happening on iOS 17 beta 7

Using .background() instead of .activityBackgroundTint() works for iOS 16, but it always defaults to dark mode for iOS 17. Did something change in iOS 17?

Still happening on iOS 17 RC and iPadOS 17 RC :-/

Similar issue, I am setting .activityBackgroundTint(nil), and as documentation indicates it should display a system default material like in iOS 16, but showing in all black instead. I am building with Xcode 15 RC

still happening

any solution?

still happening

Live Activity Dark mode issue with `.activityBackgroundTint(_:)`
 
 
Q