-
In the container app, use
FamilyActivityPicker
to select some categories & applications, and set a limit usage time. save the result in UserDefaults. -
in the
DeviceActivityMonitor
extension, read the saved selection to present the shield. it works. -
in the
DeviceActivityReportScene
extension, read the saved selection, in the report add a special icon for categories & applications with limited usage time. it does not work.
in the third step, I can read the saved selection, but I can't match the selected data with DeviceActivityResults
in the makeConfiguration
function.
Unlike the Device Activity monitor extension, the report extension runs in a sandbox that prevents your extension from making network requests or moving sensitive content outside the extension’s address space. However, defaults that are shared between an app and its extensions via App Groups should be readable by report extensions. If this is not working, please reproduce the issue and file a bug report with a sysdiagnose shortly after reproducing.
As a workaround, you may consider passing the desired apps and categories from your app to your extension via a DeviceActivityFilter
so that your extension only receives CategoryActivity
and ApplicationActivity
results for the selection made in step 1.