Search results for

DeviceActivityMonitor

127 results found

Post

Replies

Boosts

Views

Activity

Stuck waiting on Family Controls distribution entitlement, first indie app, looking for guidance/timelines
Hi everyone, solo iOS dev here. I’ve built a small focus app (“Modo”) that uses Apple’s Screen Time APIs to help curb social-media overuse. In development everything works: FamilyActivityPicker for selection, a DeviceActivityMonitor extension for schedules, and ManagedSettings shields (plus uninstall guard only while “Blocked” is active). I requested the Family Controls distribution entitlement so I can ship, but my capability request has been pending for a while and I’m not sure what the usual path forward is. What I’ve already done • Submitted the capability request (Account Holder), describing the use case (self-control / digital well-being), user consent flow,. • Implemented app + DeviceActivityMonitor + ManagedSettingsUI extensions; verified the debug build has the right entitlements and behavior. • Regenerated profiles after the request; checked codesign entitlements on the built targets. • Filed a Developer Support ticket referencing the capability request. I really appreciate any tim
1
0
250
Nov ’25
Can I read FamilyActivitySelection the container app saved in the Device Activity Report Extension?
In the container app, use FamilyActivityPicker to select some categories & applications, and set a limit usage time. save the result in UserDefaults. in the DeviceActivityMonitor extension, read the saved selection to present the shield. it works. in the DeviceActivityReportScene extension, read the saved selection, in the report add a special icon for categories & applications with limited usage time. it does not work. in the third step, I can read the saved selection, but I can't match the selected data with DeviceActivityResults in the makeConfiguration function.
1
0
1.9k
Jul ’22
How to trigger intervalDidStart in DeviceActivity API?
I have followed the two videos about Screen time API in wwdc 21 and 22. Now i want to sheild some apps during sleeping, but I encounter some problems. Problem I faced I write my monitor and override intervalDidStart and intervalDidEnd . Here is a simplified version class Mymonitor: DeviceActivityMonitor { let store = ManagedSettingsStore() override func intervalDidStart(for activity: DeviceActivityName) { super.intervalDidStart(for: activity) store.shield.applications = selection.applicationToken } then I use deviceActivityCenter to start monitor func StartSleep (_ startTime : DateComponents) { let schedule = DeviceActivitySchedule(intervalStart: startTime, intervalEnd: DateComponents(hour: 4, minute: 0), repeats: true ) let center = DeviceActivityCenter() center.stopMonitoring([.daily]) try! center.startMonitoring(.daily, during: schedule) } However, when I use StartSleep. The applications is not shielded. I have noticed that I haven't use Mymonitor in any place. In the demo Code, it seems i just ne
2
0
1.2k
Feb ’23
Screen Time API is completely UNRELIABLE!
I've been working with the Screen Time API for almost 6 months now. I found out it's completely unreliable, testing on iOS 17.4, the DeviceActivityReport is not showing, the DeviceActivityMonitor more often than not does not fire intervalDidStart. It's very frustrating. Has anyone found out a workaround? We all know there has to be something we're doing wrong, since apps like Opal and Jono does not present those types of issues. Let's please unite our forces and find a solution. How to use this API should not be a secret!
5
0
2.1k
Apr ’24
Difficulty blocking and scheduling with the Screen Time API
Hello, I'm currently facing some technical difficulties in implementing features related to application restrictions using the ScreenTime API. In our app, we allow users to set up restrictions for specific apps and app categories, with scheduled times and days (for example, Mondays and Thursdays, from 2pm to 5pm). The blocking sessions must run independently and simultaneously, allowing different sets of applications to be restricted at different times. However, I ran into two main problems: 1. Applying restrictions in the DeviceActivityMonitor extension: Although I can enable and disable restrictions, I haven't found an effective way to apply multiple FamilyActivitySelections directly in the DeviceActivityMonitor extension. The extension has to manage different blocking sessions independently, restricting different sets of applications and categories simultaneously or separately. I would like to know if it is possible to transmit this list of selected applications via UserDefaults or CoreDa
2
0
933
Oct ’24
FamilyControls App Blocking Not Working for External TestFlight Testers
Hi everyone, I'm following up on this post I made earlier about an issue I'm having with FamilyControls and the DeviceActivityMonitor extension not working for external TestFlight testers. To briefly recap: I have official Apple approval for the com.apple.developer.family-controls entitlement (distribution) The entitlement is added to both my main app and the DeviceActivityMonitor extension The App Group is correctly configured for both targets On internal TestFlight builds, everything works as expected: app blocking works, the extension runs, and selected apps are shielded. On external TestFlight builds, users get the Screen Time permission prompt, can select apps to block, but nothing is blocked. Since that post, I submitted a Code Level Support request, and Apple asked me to file a bug report via Feedback Assistant. I did that almost a month ago. The only reply I’ve received since is that they can’t give a timeframe or guarantee it will be resolved. I'm stuck in limbo with no updates and
3
0
233
May ’25
Provisioning Profile Error
I'm building an app that uses the Screen Time API and DeviceActivityMonitoring Framework. It works when I run the simulator build on iPhone 16 but when I try to launch it on my own iPhone, I get these errors. Provisioning profile iOS Team Provisioning Profile: Kanso- Digital-Wellness.Kanso-v2 doesn't include the com.apple.developer.device-activity.monitoring entitlement. KansoMonitorExtension 1 issue x Provisioning profile iOS Team Provisioning Profile: Kanso-Digital-Wellness.Kanso-v2.KansoMonitorExtension doesn't include the com.apple.developer.device-activity.monitoring en... Read something online that said a reboot would fix this, but I tried and no luck. Any ideas? I'm not very technical, so would pay someone to fix this for me :)
1
0
539
Jan ’25
ScreenTime API: Should the app used by the parent and the child be the same for FamilyActivityPicker to work?
Note: All the devices/accounts mentioned below are part of the same Family Group/ Is it necessary for the parent-side application (that uses FamilyActivityPicker to select the list of restricted apps) to be the same as the child-side application (that will request FamilyControls permission and will implement the DeviceActivityMonitor extension), for FamilyActivityPicker to work as expected? My observation is that given the FamilyControls permission being granted on the child device, FamilyActivityPicker when used on the parent device and rendered on an app with a different bundle identifier works as expected (by populating all the apps installed on the child device) in case of iOS 16 and 17, but does not work for iOS 15 (I am testing on iOS 15.8).
0
0
477
Dec ’23
Stability issues with ManagedSettings on iOS 16.6? Lots of new crashes
Hello, I am curious if someone else also noticed this. We have started getting reports about our app not working correctly (mostly related to the Device Activity monitor that runs in the background, https://developer.apple.com/documentation/deviceactivity/deviceactivitymonitor). Upon checking the Xcode Organizer I can see somewhat significant amount of crashes that mostly appear to happen on iOS 16.6 - it is possible that our users don't wait with updating iOS but still looks suspicious. The crashes are related to ManagedSettings calls outside our own code. We haven't changes this code in a while so this coupled with the fact that these crashes happen deep in the ManagedSettings framework leads me to believe there is some other issue.
3
0
1.1k
Aug ’23
ManagedSettings can't shield Messages and other system apps
When using ManagedSettingsStore to shield apps, no system apps are shielded even when specifying all application categories. Here is my code: managedSettings.shield.applicationCategories = .all() Even when using the FamilyActivityPicker and selecting All Apps & Categories system apps like Messages do not get shielded. managedSettings.shield.applicationCategories = .specific(selectedCategories) I find this strange, since Messages exists inside the Social category, and is tracked fine using DeviceActivityMonitor. Why can't it be shielded using app categories? I'd like to be able to shield all apps, including Messages, without having the user to specifically select the apps using FamilyActivityPicker. Is that possible?
1
0
1.4k
May ’23
App Playground new Target
Hi everyone, I’m working on my submission for the Swift Student Challenge and need some advice. I already have an existing app that’s live on the App Store, and I’d like to use the same app for my submission. However, while creating the App Playground, I noticed that I’m unable to create additional targets. This is problematic because my app relies heavily on specific targets like ShieldAction, ShieldConfiguration, and DeviceActivityMonitor. Without these targets, the app’s core functionality won’t work as intended. Is there a known limitation or workaround for this? How can I submit my app’s functionality within the constraints of the App Playground? Thanks in advance for your help!
2
0
480
Jan ’25
Provisioning Profiles Missing Family Controls Child Entitlements Despite Development Approval
Hello everyone, I'm facing a critical build issue related to Family Controls entitlements and would appreciate any insights or help from the community or Apple engineers. My Goal: I am trying to build and run my app on a physical device to test my DeviceActivityMonitor and ShieldConfigurationExtension. I have already been approved for the Family Controls (Development) entitlement. The Problem: When I try to build, Xcode fails with the following errors, preventing me from testing: For my DeviceActivityMonitor target: Provisioning profile ... doesn't include the com.apple.developer.deviceactivity entitlement. For my SOSAppShieldExtension target: Provisioning profile ... doesn't include the com.apple.developer.screen-time-api entitlement. The Core Evidence: This seems to be a server-side issue with how the provisioning profiles are generated. I have used the security cms -D -i command to inspect the downloaded .mobileprovision files. The inspection reveals that the profiles do contain the paren
2
0
155
Aug ’25
Reliable Shield enforcement for Parental Control App when child disables Notifications
We're building a parental control app using FamilyControls (.child authorization). Our architecture: Parent sends pause command → Firestore + FCM Child receives push → NotificationService Extension triggers main app Main app sets ManagedSettings Shields Problem: If child disables Notifications in Settings and force-quits the app, we cannot enforce Shields. What we've tried: Firestore Realtime Listener (works only when app is running) DeviceActivityMonitor (intervalDidStart/End only triggers at schedule boundaries, eventDidReachThreshold requires explicit app selection via FamilyActivityPicker) Question: Is there a recommended approach for parental control apps to reliably enforce Shields when the child has disabled notifications? Or is this a known limitation?
2
0
267
Dec ’25
Issues in rendering DeviceActivityController
Hey y'all, I've been staring at this so long that I think I might be going insane. So for Device activity , I can get the permissions to access, and I can even lock apps. But I can't get anything to print in the functions of my class with the override functions for DeviceActivityMonitor, and I can't get a rendering of a device manager - even when am just sending 0m as a string from the TotalActivityReport's makeConfiguration function without touching the data given. Can someone please lend me a hand? I have seen at least three other people asking about something like this here and stack overflow and there are no answers. I have already included and am using app groups. I have already filed a bug report with feedback assistant. Thank you! I will try and update this in the morning.
2
0
803
Jan ’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
0
1.9k
Aug ’23