I've created a new project to see how "DeviceActivityReportExtension" works.
After creating the app, added the extension and also added "FamilyControl" capability.
In the main, I've added only the report view using SwiftUI, but it does not work.
This is the error I get:
2023-04-27 18:21:55.980280-0700 TestScreenTime[38540:24995233] [default] LaunchServices: store (null) or url (null) was nil: Error Domain=NSOSStatusErrorDomain Code=-54 "process may not map database" UserInfo={NSDebugDescription=process may not map database, _LSLine=66, _LSFunction=_LSServer_GetServerStoreForConnectionWithCompletionHandler}
2023-04-27 18:21:55.980313-0700 TestScreenTime[38540:24995233] [default] Attempt to map database failed: permission was denied. This attempt will not be retried.
2023-04-27 18:21:55.980337-0700 TestScreenTime[38540:24995233] [db] Failed to initialize client context with error Error Domain=NSOSStatusErrorDomain Code=-54 "process may not map database" UserInfo={NSDebugDescription=process may not map database, _LSLine=66, _LSFunction=_LSServer_GetServerStoreForConnectionWithCompletionHandler}
2023-04-27 18:21:56.029480-0700 TestScreenTime[38540:24995233] [default] Remote viewcontroller request failed: Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service with pid 38542 named com.apple.DeviceActivityUI.DeviceActivityReportService.viewservice was interrupted, but the message was sent over an additional proxy and therefore this proxy has become invalid." UserInfo={NSDebugDescription=The connection to service with pid 38542 named com.apple.DeviceActivityUI.DeviceActivityReportService.viewservice was interrupted, but the message was sent over an additional proxy and therefore this proxy has become invalid.}
The deployment target is set to 16.0, and Xcode version is 14.3 (14E222b).