I could not show Device Activity Report in my App

Hello I would like to show my children devices activity reports on the parent device.Im using. family controls.

-I enabled Screen Time in parent, for monitoring child devices uses.

-I implemented Device Activity Monitor extension on my project

  • And also I added to that code samples, but I could not understand how its working.

https://developer.apple.com/documentation/deviceactivity/deviceactivityreport

The question is How can I show usage of the apps in my App with customized SwiftUI views? as I said I did lots of suggestions but I could not implemented.

I enabled Screen Time in parent, for monitoring child devices uses.

In order to report child usage on a parent's device, you must ensure that your app is properly entitled and authorized for Family Controls on the child devices using an AuthorizationCenter.

The question is How can I show usage of the apps in my App with customized SwiftUI views? as I said I did lots of suggestions but I could not implemented.

If you click File > New > Target... > iOS > Device Activity Report Extension in Xcode, it will create a simple Device Activity Report extension. Then, your app can create a DeviceActivityReport with a DeviceActivityFilter that specifies activity data for .children. Your extension will then be provided the data for the parent's children and can use this data to render the contents of the report.

I could not show Device Activity Report in my App
 
 
Q