Are there published limits for how many concurrent ManagedSettingsStore our apps can have going at once?
More importantly, is there a way for our app to retrieve all the ManagedSettingStore.Name that are already applied by our app? (Not system wide, just our app).
DeviceActivityCenter().activities fetches all the DeviceActivityName that are being monitored actively. Is there something similar?
Post
Replies
Boosts
Views
Activity
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?
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?