Please help make DeviceActivityReport reliably show up

Our app uses DeviceActivityReport to display the user’s screen time. The performance of DeviceActivityReport is often very poor. These issue occur commonly:

  • Screen time is reported as 0 minutes
  • DeviceActivityReport View appears completely blank
  • The host app loses connection with the DeviceActivityReport altogether

I have implemented several workarounds which only slightly improve the performance, to varying degrees depending on the device iOS:

  • Inside the DeviceActivityReport code - retry fetching screen time data until it returns a non-zero result
  • Implement a “refresh” button which reloads the DeviceActivityReport view from the host app

However, due to the sandboxed nature of DeviceActivityReport, there is no way for the host application to tell if the DeviceActivityReport extension is experiencing these performance issues. It results in a really bad user experience.

I am building the app with Xcode 14 due to another issue where DeviceActivityReport fails to load for all iOS 16 devices when built with Xcode 15 (this is a know issue, here’s a link to a discussion on the developer forums: https://developer.apple.com/forums/thread/735915). However, when testing on iOS 17 devices with Xcode 15 builds, the above issues still occur.

I have received no crash reports from DeviceActivityReport.

These issues are known bugs and have been discussed on the developer forums, but I haven't yet seen a solution. Other screen time apps exist that use the DeviceActivityReport seemingly flawlessly, so I know that there is a way to improve the performance of DeviceActivityReport in my app.

Please help! I have been dealing with this poor performance for a long time now with almost no improvement!

@_lilpit , @thomas_maht - have Opal and Jomo implemented any special tricks / hacks to improve the performance of DeviceActivityReport - your apps display screen time especially well on my device.

Hello @charleswinston , you got any solution ??

Still haven't gotten any solution to this yet :(

Please help make DeviceActivityReport reliably show up
 
 
Q