Device Activity

RSS for tag

Monitor web and app usage through custom time windows and events.

Posts under Device Activity tag

90 Posts
Sort by:

Post

Replies

Boosts

Views

Activity

Irrecoverable Crash in Extension
We are seeing cases where DeviceActivityMonitoring extension is crashing permanently. This is due to a now-fixed bug that was causing a stack overflow. On devices where the extension crashed, it appears permanently unable to recover - even weeks after the crash and after multiple restarts of the device. It looks like recovery is being attempted, as the same four NSLog activities are emitted roughly every second that the phone is active. Logs: Process: DeviceActivityMonitoring Activity: beginning extension request Message: NSExtensionPrincipalClass `<private>` does not conform to NSExtensionRequestHandling protocol! Process: DeviceActivityMonitoring Activity: Loading Preferences From User Session CFPrefsD Message: Process: DeviceActivityMonitoring Activity: container_system_group_path_for_identifier Message: Requesting container lookup; class = 13, identifier = <private>, group_identifier = <private>, create = 1, temp = 0, euid = 501, uid = 501 container_query_get_single_result: success container_system_group_path_for_identifier: success Process: DeviceActivityMonitoring Activity: container_create_or_lookup_app_group_path_by_app_group_identifier Message: Requesting app group container lookup; personaid = 1000, type = DEFAULT, name = 9F7F4BA7-79CF-453C-B81C-568E96ADB711, origin [pid = 29, personaid = 199], proximate [pid = 3505, personaid = 199], identifier = <private>, euid = 501, uid = 501, platform = 2 containermanagerd stat [<private>]: exists: 1, isDirectory: 0, fsNode: <~~~> containermanagerd <private> is sandboxed. Issuing token for path: [<private>] (extension class: com.apple.sandbox.application-group) containermanagerd [0] command=38, client=<<~~~>, u=<501/501/~~/0/1000>, uid=501, pid=5595, sandboxed=1, platform=2 (1/1/0) [<~~~>], cached, cs cached>, error=(null) Consuming sandbox extension; path = [<private>], key = 0 Revoking sandbox extension; key = 0 Can anyone provide some insight into what is going on with the recovery attempt here? Practically, how can we recover the extension in these cases? Will an app update force the extension to restart properly? Hard reset of the device? Something else? Is there any way to check on the health of an extension from the main app so that we can deterministically know if the extension is healthy or not before relying on it?
1
1
569
Aug ’23
Target is null when adding an extension (Device Activity Monitor Extension)
When I try to add an extension to my Xcode project, I get the following warning: Activate “MyMonitor” scheme? This scheme has been created for the “(null)” target. Choose Activate to use this scheme for building and debugging. Schemes can be chosen in the toolbar or Product menu. I'm trying to understand a few things about this error: What exactly does the "(null)" target refer to? Could it be that Xcode is creating the scheme before the target is complete? Could this "(null)" target be the reason my code doesn't seem to be connecting properly to my app extension? How can I correct this issue? I ran into this during the process of trying to add a Device Activity Monitor Extension to my iOS project. Any hints are welcome, I have been stuck on this for too long.
6
1
1.3k
Oct ’23
Memory limit for Device Activity Monitor Extension
I am trying to develop an application that can enforce Screen Time restrictions on the target device, however I get stuck at the part where I have scheduled callbacks for my class that implements the extension for DeviceActivityMonitor. For debugging, I first attach to the app extension target process via Debug > Attach to Process > Process Name. But after scheduling monitoring that receives a callback immediately, the process exits with the following error: Thread 1: EXC_RESOURCE (RESOURCE_TYPE_MEMORY: high watermark memory limit exceeded) (limit=6 MB) Is the maximum allowed memory for Device Activity Monitor extensions really just 6 MB, or am I doing something wrong? If it is indeed the case, is there any way to increase it? 6 MB seems quite restrictive to me.
1
2
858
Aug ’23
Family Controls crash when app launching
Hey 👋 I have an app that uses Device Activity Monitor. For the previous releases there was no problem. However I made some improvements in my app and send it to review. Review team getting following crash log but I couldn't find the issue. It's working both in my simulator and a real devices.(iPhone, iPad). I removed some logs from here because of character limitations. Exception Codes: 0x0000000000000000, 0x0000000000000000 Termination Reason: FRONTBOARD 2343432205 <RBSTerminateContext| domain:10 code:0x8BADF00D explanation:scene-create watchdog transgression: application<>:15592 exhausted real (wall clock) time allowance of 19.97 seconds ProcessVisibility: Foreground ProcessState: Running WatchdogEvent: scene-create WatchdogVisibility: Foreground WatchdogCPUStatistics: ( "Elapsed total CPU time (seconds): 7.760 (user 4.070, system 3.690), 5% CPU", "Elapsed application CPU time (seconds): 0.111, 0% CPU" ) reportType:CrashLog maxTerminationResistance:Interactive> Triggered by Thread: 0 Thread 0 name: Dispatch queue: com.apple.main-thread Thread 0 Crashed: 0 libsystem_kernel.dylib 0x1d8256ca4 mach_msg2_trap + 8 1 libsystem_kernel.dylib 0x1d8269b74 mach_msg2_internal + 80 2 libsystem_kernel.dylib 0x1d8269e4c mach_msg_overwrite + 540 3 libsystem_kernel.dylib 0x1d82571e8 mach_msg + 24 4 libdispatch.dylib 0x1a108320c _dispatch_mach_send_and_wait_for_reply + 548 5 libdispatch.dylib 0x1a108359c dispatch_mach_send_with_result_and_wait_for_reply + 60 6 libxpc.dylib 0x1f8fa9218 xpc_connection_send_message_with_reply_sync + 240 7 Foundation 0x193f6ff18 __NSXPCCONNECTION_IS_WAITING_FOR_A_SYNCHRONOUS_REPLY__ + 16 8 Foundation 0x193f032c4 -[NSXPCConnection _sendInvocation:orArguments:count:methodSignature:selector:withProxy:] + 2192 9 Foundation 0x193f01ac0 -[NSXPCConnection _sendSelector:withProxy:arg1:] + 116 10 Foundation 0x193f019f8 _NSXPCDistantObjectSimpleMessageSend1 + 60 11 FamilyControls 0x1e772388c 0x1e76ee000 + 219276 12 FamilyControls 0x1e7722b0c 0x1e76ee000 + 215820 13 libdispatch.dylib 0x1a1067eac _dispatch_client_callout + 20 14 libdispatch.dylib 0x1a10696ec _dispatch_once_callout + 32 15 FamilyControls 0x1e7722d18 0x1e76ee000 + 216344 16 MyApp 0x102314bfc AppUsagesViewModel.init(dependencies:) + 510972 (AppUsagesViewModel.swift:29) 17 MyApp 0x1022b2b00 closure #1 in MainTabBarController.setupTabbar() + 109312 (MainTabBarController.swift:55) 18 MyApp 0x1022b3904 specialized Sequence.compactMap<A>(_:) + 112900 (<compiler-generated>:0) 19 MyApp 0x1022b2750 MainTabBarController.setupTabbar() + 108368 (MainTabBarController.swift:47) 20 MyApp 0x1022b29a8 @objc MainTabBarController.viewDidLoad() + 108968 (<compiler-generated>:0) 21 UIKitCore 0x19bf381f4 -[UITabBarController initWithNibName:bundle:] + 156 22 MyApp 0x1022b3a7c specialized static MainTabBarController.build(_:) + 113276 (MainTabBarController.swift:96) 23 MyApp 0x102313f80 specialized AppDelegate.application(_:didFinishLaunchingWithOptions:) + 507776 (AppDelegate.swift:45) 24 MyApp 0x1023132d8 @objc AppDelegate.application(_:didFinishLaunchingWithOptions:) + 504536 (<compiler-generated>:17) As far as I understood from the log the crash is happened right there AppUsagesViewModel.swift:29. I have a following variable in that line. private let parentalControls = AuthorizationCenter.shared What could be the reason of that crash? If someone can help me I really appreciate it. Thanks!
4
0
564
Aug ’23
DeviceActivityReport - filtering applications for makeConfiguration
I am trying to filter my DeviceActivityReport to only show activity for the specific app tokens I pass in. Right now, it shows activity for all apps. Is there something else I need to do in makeConfiguration so that it only filters the application tokens that I'm filtering by? filter = DeviceActivityFilter(segment: .hourly(during: dateInterval), applications: task.selection.applicationTokens) struct TotalActivityReport: DeviceActivityReportScene { // Define which context your scene will represent. let context: DeviceActivityReport.Context = .totalActivity // Define the custom configuration and the resulting view for this report. let content: (String) -> TotalActivityView func makeConfiguration(representing data: DeviceActivityResults<DeviceActivityData>) async -> String { // Reformat the data into a configuration that can be used to create // the report's view. let formatter = DateComponentsFormatter() formatter.allowedUnits = [.minute, .second] formatter.unitsStyle = .abbreviated formatter.zeroFormattingBehavior = .dropAll let totalActivityDuration = await data.flatMap { $0.activitySegments }.reduce(0, { $0 + $1.totalActivityDuration }) return formatter.string(from: totalActivityDuration) ?? "No activity data" } }
1
0
617
Aug ’23
DeviceActivityMonitor Extension Not Working
I added the extension via targets. And I added code in the intervalDidStart() override to print and send a notification. But it never seems to run. Am I supposed to do any other steps after adding the extension? // Make sure that your class name matches the NSExtensionPrincipalClass in your Info.plist. class DeviceActivityMonitorExtension: DeviceActivityMonitor { func getSelectionFromUserDefaults() -> FamilyActivitySelection { let defaults = UserDefaults.standard if let encodedData = defaults.data(forKey: "ScreenTimeSelection") { let decoder = PropertyListDecoder() if let selection = try? decoder.decode(FamilyActivitySelection.self, from: encodedData) { return selection } } return FamilyActivitySelection() } override func intervalDidStart(for activity: DeviceActivityName) { super.intervalDidStart(for: activity) print("HERE!") let content = UNMutableNotificationContent() content.title = "Feed the cat" content.subtitle = "It looks hungry" content.sound = UNNotificationSound.default // show this notification five seconds from now let trigger = UNTimeIntervalNotificationTrigger(timeInterval: 5, repeats: false) // choose a random identifier let request = UNNotificationRequest(identifier: UUID().uuidString, content: content, trigger: trigger) // add our notification request UNUserNotificationCenter.current().add(request) let selection = getSelectionFromUserDefaults() let applications = selection.applicationTokens let categories = selection.categoryTokens let webCategories = selection.webDomainTokens let store = ManagedSettingsStore() store.shield.applications = applications.isEmpty ? nil : applications store.shield.applicationCategories = ShieldSettings.ActivityCategoryPolicy.specific(categories, except: Set()) store.shield.webDomainCategories = ShieldSettings.ActivityCategoryPolicy.specific(categories, except: Set()) }
2
1
662
Aug ’23
DeviceActivityMonitorExtension functions not being called
I'm having trouble with my DeviceActivityMonitorExtension. The intervalDidStart function is not being called when the scheduler is created. Does anyone have an idea why this is? let schedule = DeviceActivitySchedule( intervalStart: DateComponents(hour: 15, minute: 23), intervalEnd: DateComponents(hour: 16, minute: 55), repeats: true ) class MySchedule { static public func setSchedule() { let center = DeviceActivityCenter() center.stopMonitoring([.daily]) do { try center.startMonitoring(.daily, during: schedule) } catch { print("Error monitoring schedule: ", error) } } } class DeviceActivityMonitorExtension: DeviceActivityMonitor { override func intervalDidStart(for activity: DeviceActivityName) { super.intervalDidStart(for: activity) SelectedApps.shared.setRestrictions() } private let _SelectedApps = SelectedApps() class SelectedApps: ObservableObject{ @Published var selection: FamilyActivitySelection let store = ManagedSettingsStore() init() { if let savedSelection = UserDefaults.standard.object(forKey: "savedSelection") as? Data { let decoder = JSONDecoder() if let loadedSelection = try? decoder.decode(FamilyActivitySelection.self, from: savedSelection) { selection = loadedSelection } else { selection = FamilyActivitySelection(includeEntireCategory: true) } } else { selection = FamilyActivitySelection(includeEntireCategory: true) } } class var shared: SelectedApps { return _SelectedApps } func setRestrictions(){ let applications = selection store.shield.applications = applications.applicationTokens.isEmpty ? nil : applications.applicationTokens store.shield.applicationCategories = applications.categoryTokens.isEmpty ? nil : ShieldSettings.ActivityCategoryPolicy.specific(applications.categoryTokens) }
3
0
723
Aug ’23
Device Activity API silently stops working because of rate limiting?
We're developing a Health app where we would like to track the Screen Time of the user to display relevant correlations with other health and lifestyle data. Using the Device Activity API we're able to subscribe to events when a user reaches certain thresholds, so to track this we've set up events every x minutes to be able to track progress during the day, like this: user_reached_5_minutes user_reached_10_minutes and so on.. This works fine and is stable (as long as it works). But I suspect we're running into some kind of rate limiting issue since it stops working during the day, and after that it seems to need a new day for it to start working again. Worth noting is that our monitoring interval is repeating daily, so that might very well be related. I've not been able to find any documentation on this, and no error messages indicating we're running into a limit in the logs. The only related thing I've seen is this - but it seems to suggest this should fail when calling startMonitoring and not silently fail like we're experiencing: Attempting to monitor too many activities or activities that are too tightly scheduled can cause this method to throw an error. The system throws an error if the attempt to monitor the device activity failed. To avoid errors, reduce the number of unique, tightly-scheduled activities. For example, consider using the warningTime property of an activity’s schedule. Does anyone have an idea of what is going on here?
0
1
408
Jul ’23
Can use Screen Time API access codes in such like Location Push Service Extension or Widget Extension?
We want to include Screen Time API access codes in not only main app (container app) but also app extension such like Location Push Service Extension or Widget Extension. On app extension side, are there any restrictions to create and use objects of below classes in either cases , main app is running or not running ? ManagedSettingsStore DeviceActivitySchedule DeviceActivityCenter and also, do they do the same thing that works on the main app side like below ? shield application create a device activity schedule startMonitoring
0
0
388
Jun ’23
Unblock a particular app in ShieldAction after using ActivityCategoryPolicy.all()
I am using Managed Settings to block all apps during a set period of time using the below method. override func intervalDidStart(for activity: DeviceActivityName) { super.intervalDidStart(for: activity) ManagedSettingsStore().shield.applicationCategories = .all() } When a user opens an app during that time, they should be allowed to press a button on the shield which lets them "continue using that app", just like the default iOS screen time allows for. However, this doesn't seem possible right now when the below delegate is called for ActivityCategoryToken ShieldAction: override func handle(action: ShieldAction, for category: ActivityCategoryToken, completionHandler: @escaping (ShieldActionResponse) -> Void) { switch action { case .primaryButtonPressed: completionHandler(.close) case .secondaryButtonPressed: ManagedSettingsStore().shield.applicationCategories = .all(except: category) //this is not possible right now. completionHandler(.none) @unknown default: fatalError() } } This is because the .all(except:) method takes a set of application tokens, but the handle delegate method on activityCategoryTokens only provides application category tokens. Is there no way to get around this? It would be very helpful if either a) the delegate method for ActivityCategoryToken ShieldAction also provided the ApplicationToken that was blocked (this would be preferred), or b) the .all(except: ) method also accepts ActivityCategoryTokens as an input.
0
0
522
Jun ’23
How long is DeviceActivityData accessible in DeviceActivityReport?
Using the DeviceActivity framework we are able to display data based on a user's screentime and device usage. With the DeviceActivityFilter property, you can specify the date interval to collect data between. In testing, it seems that data only becomes accessible once the extension has been installed (so the extension isn't reading the screentime data already collected on device). However, once installed, I'm curious how far back you can query data from in the data interval? Opal which uses the Screentime API appears to have a lifetime Screentime metric, so hypothetically it should possible to query data as far back as collection starts. Unless they are getting around the sandbox environment and storing the data somehow. Side note on Opal -- They seem to have a community average of Screentime among people in the same age group. Does anyone know how they are collecting the data for this average? Is it actually using live Screentime data or just aggregating data from other studies?
2
0
577
Apr ’24
ShieldConfigurationExtension not working
I created a ShieldConfigurationExtension in Xcode 14.3 with File > New > Target > ShieldConfigurationExtension. This created the extension with all the necessary Info.plist values (correct NSExtensionPrincipalClass, etc.), with the extension included in embedded content in the host app target. No matter what I try, the extension is not getting invoked when I shield applications from my host app. The custom UI does not show as the shield, and looking at the debugger, an extension process is never invoked. I am shielding categories like this: let managedSettings = ManagedSettingsStore() ... managedSettings.shield.applicationCategories = .all() And my extension code overrides all the ShieldConfigurationDataSource functions. class ShieldConfigurationExtension: ShieldConfigurationDataSource { override func configuration(shielding application: Application) -> ShieldConfiguration { return ShieldConfiguration( backgroundBlurStyle: UIBlurEffect.Style.systemThickMaterial, backgroundColor: UIColor.white, icon: UIImage(systemName: "stopwatch"), title: ShieldConfiguration.Label(text: "You are in a Present Session", color: .yellow) ) } override func configuration(shielding application: Application, in category: ActivityCategory) -> ShieldConfiguration { return ShieldConfiguration( backgroundBlurStyle: UIBlurEffect.Style.systemThickMaterial, backgroundColor: UIColor.white, icon: UIImage(systemName: "stopwatch"), title: ShieldConfiguration.Label(text: "You are in a Present Session", color: .yellow) ) } override func configuration(shielding webDomain: WebDomain) -> ShieldConfiguration { return ShieldConfiguration( backgroundBlurStyle: UIBlurEffect.Style.systemThickMaterial, backgroundColor: UIColor.white, icon: UIImage(systemName: "stopwatch"), title: ShieldConfiguration.Label(text: "You are in a Present Session", color: .yellow) ) } override func configuration(shielding webDomain: WebDomain, in category: ActivityCategory) -> ShieldConfiguration { return ShieldConfiguration( backgroundBlurStyle: UIBlurEffect.Style.systemThickMaterial, backgroundColor: UIColor.white, icon: UIImage(systemName: "stopwatch"), title: ShieldConfiguration.Label(text: "You are in a Present Session", color: .yellow) ) } } What am I missing?
4
2
1.6k
Nov ’23
Device Activity - DeviceActivitySchedule DateComponents intervals
Hi, I'm having trouble understanding what is the correct DateComponents format for the DeviceActivityCenter.startMonitoring to work as expected. Here's how it behaves with my setup: The schedule interval is set for 15 minutes (the minimum). On intervalDidStart I set the shields shield.applicationCategories = .all(except: exclCat) shield.webDomainCategories = .all(except: exclWeb) On intervalDidEnd I clear the settings shield.applicationCategories = nil shield.webDomainCategories = nil Different behavior with different DeviceActivitySchedule intervals. In the below examples I'll refer to hour, minute and second components as time components, and the calendar, timeZone, year, month, day, hour, minute and second components as date and time components. Also, with all combinations below no errors are thrown when calling the startMonitoring method. A. ❌ The start interval has time components, while the end interval has date and time components: The intervalDidStart is not triggered. DeviceActivitySchedule(schedule: <USDeviceActivitySchedule: 0x28354a5e0> IntervalStart: <NSDateComponents: 0x2839c7f40> { Hour: 9 Minute: 24 Second: 55 IntervalEnd: <NSDateComponents: 0x2839c7f70> { Calendar: <CFCalendar 0x2818f9090 [0x1e4fb1d10]>{identifier = 'gregorian'} TimeZone: Asia/Manila (GMT+8) offset 28800 Calendar Year: 2023 Month: 5 Leap Month: 0 Day: 15 Hour: 9 Minute: 39 Second: 55 Repeats: 0 WarningTime: (null)) B. ❌ The start interval has date and time components, while the end interval has time components: Here, the opposite of the above example happens — the intervalDidStart is triggered, but the intervalDidEnd is not. C. ❌ Both intervals have time components: The intervalDidStart is not triggered. D. ✅ Only hour, minute, and second components for both start and end intervals: Callbacks are called as expected. DeviceActivitySchedule(schedule: <USDeviceActivitySchedule: 0x282e80450> IntervalStart: <NSDateComponents: 0x2822f39f0> { Hour: 9 Minute: 12 Second: 15 IntervalEnd: <NSDateComponents: 0x2822f3a00> { Hour: 9 Minute: 27 Second: 15 Repeats: 0 WarningTime: (null)) So it seems that the correct and working version is with the time components only. However, from the documentation, the maximum schedule interval is a week. So if I need to set the schedule starting from a certain time of day A and ending in a certain time of day B, what should the DateComponents look like? Thanks for you help!
5
2
1.4k
Oct ’23
DeviceActivityReport Lag
There have been several posts (i.e. here, here) about the lagginess of the DeviceActivityReport extension. Often it takes a few seconds for the view to load, or sometimes doesn't show up at all. I've confirmed this is not a case of excessive memory usage in the extension (exceeding 100MB), because I've profiled the extension and it consistently maxes out at 10MB. I've placed a loading screen behind the DeviceActivityReport inside a ZStack in the host app in order to see if the lag is because it takes some time for the extension to spin up - but the loading screen does not appear, indicating that the extension is running right away, but receiving the view from the extension in the host app is where the lag happens. It's been extremely difficult to debug because the lag only occurs a fraction of the time, and DeviceActivityReport is pretty much a black box. There's no documentation about how the host app and extension actually communicate. I've also combed through the logs using the Console app on Mac with no indication of any issues, (but I do see the message "Connection to view service was invalidated" coming from the extension even when there is no lag). I'm pretty convinced that the problem lies in the host app, because when I strip everything away from the host app, DeviceActivityReport never lags. I suspect that there are processes running (network requests, async tasks, or state updates) that block the report view from being received in the host app. Could you please help me understand why this could be happening, with as many details as you could provide? Any details on how the host and extension communicate, what processes could block the view from appearing, or anything else. Seems like this is a common issue but plenty of apps also don't experience it. Any guidance you can provide would be extremely helpful, as I've been trying to fix this bug every since I've been working with this API with no luck. Thanks in advance!
3
4
978
Apr ’24
Setting values in UserDefaults in DeviceActivityMonitor extension
I understand that the DeviceActivityMonitor extension is designed to be very lightweight, and the system terminates the extension as soon as its callback functions return. However, I want to save values to UserDefaults inside the extension's callback functions. This creates concurrency issues for my app because the documentation for UserDefaults states that "When you set a default value, it’s changed synchronously within your process, and asynchronously to persistent storage and other processes." In order to guarantee that these values are persisted before the extension terminates my app, I want to call UserDefaults.synchronize(), but its documentations states that it's "unnecessary and shouldn't be used." Furthermore, it's listed under "Legacy" but not marked deprecated. Is synchronize() the recommended way to solve my concurrency problem? Or could there be a better way to wait for storage synchronization before returning from a synchronous function?
5
1
1.2k
Jun ’23
DeviceActivityMonitor eventDidReachThreshold triggering every time in same second as intervalDidStart gets called
Hello, I am trying to make use of Screentime API in my app, I have issue with the DeviceActivityMonitor extension. I have schedule DeviceActivitySchedule which I set like this: let schedule = DeviceActivitySchedule( intervalStart: DateComponents(hour: 00, minute: 00), intervalEnd: DateComponents(hour: 23, minute: 59), repeats: false ) and DeviceActivityEvent which I set like this: let dateComponent = DateComponents(minute: 1) var events: [DeviceActivityEvent.Name: DeviceActivityEvent] = [ .encouraged: DeviceActivityEvent(threshold: dateComponent) ] The issue is that every time I start monitoring, by calling this piece of code from the app: do { print("Try start monitoring...") try center.startMonitoring(.daily, during: schedule, events: events) } catch { print("Error: ", error) } I catch in the extension that the event intervalDidStart is called, but in the same second I get called eventDidReachThreshold. What could be done wrong? Is event set properly? I was trying to set event with different Datecomponents (minute, hour, second), by setting different amount of time, like: let dateComponent = DateComponents(minute: 3) let dateComponent = DateComponents(second: 120) but nothing worked differently, every time, it was triggering eventDidReachThreshold right after the interval starts. If I put something unnormally high, like: let dateComponent = DateComponents(second: 120) The event eventDidReachThreshold is not triggered same time as the intervalStarts, but it is not counting time properly. Please if someone could help me, I want to be able to use events properly, with the amount of time which I set. Any help would be appreciated. Thanks in advance
3
1
1.1k
Oct ’23
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?
7
1
2.0k
Aug ’23