Label with ApplicationToken cannot be styled?

Hi, I'm trying to make use of the Device Activity Labels where you supply an ApplicationToken. I can successfully get it to show the icon + title of the Application (twitter in my case) but I cannot get the styling to work.

// Works
.labelStyle(.iconOnly)
.labelStyle(.titleOnly)
.border(...)

![]("https://developer.apple.com/forums/content/attachment/9660b578-a36f-4d5a-ae18-653a207aa5ab" "title=Screenshot 2023-03-12 at 12.57.34 PM.png;width=1218;height=844")

// Does NOT work
.font(.largeTitle)
.foregroundColor(.blue)

I have checked the same style (or just modifiers) against a standard Label and they actually do work in the code below.

// This is an application token. Some style not applied.
Label(targetApp)
  .labelStyle(MyStyle())

// Showing the same style using a simple label. All styles correctly applied.
Label("Twitter", systemImage: "video.square.fill")
  .labelStyle(MyStyle())

Is changing the font + color of the title for this Label(_ applicationToken:) supported?

Post not yet marked as solved Up vote post of heykurt Down vote post of heykurt
1.5k views

Replies

This is what the resulting UI looks like.

For completeness here's MyStyle

Here's `MyStyle()`

struct MyStyle: LabelStyle { func makeBody(configuration: Configuration) -> some View { return Label(configuration) .font(.largeTitle) .labelStyle(.) .foregroundColor(.blue) .border(Color.red) } }


The code will also fail if just use `.font(.largeTitle)` directly against the `Label(token)`

Have you found any solution? I also need.

Also watching this thread and dealing with the same issue. For me, a user can toggle light/dark mode, so without styling ability, a white label will disappear when the background is flipped from black to white.

Screentime team, PLEASE give the ability to style ApplicationToken title labels, or the labels are pretty much useless!

Have you solved the problem? I also have the similar problem. When switching between light/dark modes, the Label's style remains from the previous mode. However, when I turn the app off and on, the Label's style changes appropriately.