I'm looking for a way to check user Screen Time and trigger a notification after a specified amount of time on certain apps. I have the code from WWDC21 but I was wondering if I could get the code sample for the Worklog app created for WWDC22.
Would really help as a reference point for building my project.
Thank you!
What's new in Screen Time API
RSS for tagDiscuss the WWDC22 Session What's new in Screen Time API
Posts under wwdc2022-110336 tag
6 Posts
Sort by:
Post
Replies
Boosts
Views
Activity
Hi, I’d like to access the source code for the demo app from whats new in screen time api. Can I get a copy of it through email or can you post it under sample code of wwdc 22 section?
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?
There is frequently a delay of a few seconds before a DeviceActivityReport renders its view generated from the DeviceActivityReportExtension. It will also sometimes flash with zero data before hydrating with the real activity data (tested with extension code taken directly from XCode boilerplate)
Is there a way to be notified when the DeviceActivityReport renders successfully or is still processing, i.e. so a loading indicator can be presented while the extension runs?
Thanks!
Anyone else have this problem where the DeviceActivityCenter is silently failing/hanging on startMonitoring?
No error caught but the code won't progress, and the intervalDidStart never runs.
I've requested for family control via:
https://developer.apple.com/contact/request/family-controls-distribution
& got approved.
I've now created new provision files with family control being checked in the identifiers & uploaded manually. Yet, still get:
Provisioning profile "redoAppStore" doesn't support the Family Controls capability.
Provisioning profile "redoAppStore" doesn't include the com.apple.developer.family-controls entitlement.
The family control capability is added to my main target (IOS app) as well.
What should I do to get it uploaded?