Unable to Use DeviceActivityReport to Show Screen Time in App

Hi team. I am working on an app that uses the Screen Time API. I got access to the family controls (distribution) capability through the request process for my main app. I added a DeviceActivityReport extension in XCode, but haven't been able to get the extension to show up on the screen. I noticed that the extension only has the development version of the family controls capability available. Is this the source of my errors? I was able to get the screen time displayed in a test app I built where both the main app and extension used the development version of the capability, which led me to believe that discrepancy could be the issue.

Let me know if there is anything I can provide to help in the debugging process. I didn't send a minimal example in this request due to the fact that I would have to remove most of my functionality to create a "minimal" example (since the signing is only for my main app), but I can do that if needed. Thanks! I looked through the logs in the console for the phone (I'm testing on a real iPhone 13 Pro Max), but didn't see anything that popped out after looking (not exactly sure what to look for though).

STEPS TO REPRODUCE: Create an app with the Family Controls, Distribution capability. Then create the DeviceActivityReport with the Family Control, Development capability. Attempt to see the DeviceActivityReport in the main app.

NOTE: I was successfully able to create a minimal test app completely separately that used the Development versions of the capabilities for both with the exact same extension code. That's why I think the issue could be due to the capability version discrepancy.

Were you granted the entitlement for Family Controls, or have you simply enabled the capability in Xcode?

If you need the entitlement you can learn more about how to request it here.

I already completed the request process and was granted access to the Distribution version of the capability for my app.

That's why I now have the mismatch between versions, since my main app is using the Distribution version while my DeviceActivityReportExtension uses the development version.

I realized what the issue was. I had another file using the DeviceActivityReportExtension somewhere in my code that was configured incorrectly. That view was never being shown, so I thought it wouldn't impact anything. But deleting that view actually made the original DeviceActivityReportExtension show up.

Another question I have for the engineer is do I need to worry about getting the distribution capability version for my DeviceActivityReportExtension through the request process? Or is it fine if just my main app has the distribution capability.

As long as it was given to your main app, the permission will also be available to your extension.

Unable to Use DeviceActivityReport to Show Screen Time in App
 
 
Q