I’m trying to integrate Screen Time usage data into my iOS app. The goal is to fetch the total time a user spends on their device (daily or weekly), and store this locally for analysis.
So far, I’ve explored the DeviceActivity and FamilyControls frameworks:
1.DeviceActivityReport works but seems tied to extensions that show reports, not directly fetching raw values inside the main app. 2.I haven’t found a way to simply retrieve the total screen-on time (similar to what Settings → Screen Time shows).
My questions: 1.Is there any public API that allows retrieving the user’s total Screen Time (like the one shown in Settings)? If yes, what’s the correct approach — should I use 2.DeviceActivityMonitorExtension, FamilyActivitySelection, or another framework? 3.If not, is it expected that this data is only available in the Settings app and not exposed to developers?
Any guidance or official confirmation would be really helpful.
Thanks in advance!