Access The Duration Of Apps Usage Using Family Control API

I've successfully managed to present the duration using DeviceActivityReportExtension,

however, I need to show the user how much time is left for him to use the monitored apps (The user answeres questions and gains screen time that he can then spend using Social apps).

Everywhere I've looked said it is not possible to access the actual time duration spent on app but only to use DeviceActivityReportExtension to present it, but the app 1Question does exactly what I'm trying to achieve successfully.

Hey can you please help me to get the screen time data as for now when I am trying to fetch data "func makeConfiguration(representing data: DeviceActivityResults<DeviceActivityData>)" This method always return 0 data

Access The Duration Of Apps Usage Using Family Control API
 
 
Q