Device Activity Label constantly logging 3x error

Every time I present an application title using SwiftUI view using Label(some_token) I get 3x of these logs, which sometimes incurs a noticeable lag in displaying my containing view. Otherwise the icon + title display correctly.

I have tried making the most simple SwiftUI View just containing Label(some_token) without any other code, no state, no navigation, no transitions, no other views, just that and I still get this - usually in triplicate:

[activityItem] Label is already or no longer part of the view hierarchy
[activityItem] Label is already or no longer part of the view hierarchy
[activityItem] Label is already or no longer part of the view hierarchy

If I use .labelStyle(.titleOnly) I only see it twice.

Here's the code I used

var body: some View {
  VStack {
    // uses a static token provided just for testing.
    // same behavior regardless of how the token is passed in.
    Label(some_static_token)
      .labelStyle(.titleOnly)
  }
}

Is this log something to be expected?

Seeing the same fwiw. Makes the logs incredibly difficult to read

Getting same issue

I've got same issue

I've also got this issue. I'm pretty sure it's also causing the screen to hang for a while while it loads the labels.

Following - I've tied these log messages in my code to an issue that causes the title label renders to disappear on every rerender

Same issue here + displaying these labels can lead to severe hangs, basically making them unusable in production. These bugs have been around for months now.

Same: FB11836901 (has a testing app to reproduce)

Has anyone found a solution to this? I'm worried that I'm doing something that causes performance issues regarding thomas_maht's comment and would like to make sure that this warning is harmless

Try using LazyVStack instead of VStack if looping through some values to render in Labels / apply use an Equatable with the data you're trying to render. That fixed it for me.

Device Activity Label constantly logging 3x error
 
 
Q