DeviceActivityReportExtension error

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).

I've fixed this issue by setting iOS Deployment Target to "iOS 16.0".

IMPORTANT: Update the setting for the added extension.

  1. Project -> Info -> iOS Deployment Target
  2. Targets -> {your_app} -> General -> Minimum Deployments
  3. Targets -> {Device_Activity_Report_Extension} -> Build Settings -> iOS Deployment Target

In my case, #3 was set as "16.4", and it was causing the issue.

Is there an update on this thread about how to fix this one? Thanks

DeviceActivityReportExtension error
 
 
Q