ShieldConfigurationDataSource not refreshing when reactivated while shielded app is open

I'm working with ShieldConfigurationDataSource and customizing it based on variables I'm storing in a shared UserDefaults container group. It updates with fresh information when the shielded app is first launched and also when ".defer" is called in the ShieldActionDelegate. However, it does not update when the shielded app is already open and the ManagedSettingsStore.shield.applications is set to nil. I've tried doing this in a couple different ways including calling it when activated from the callbacks in DeviceActivityMonitorExtension. How can the Shield Configuration be refreshed when the app is shielded while currently open?

thanks!

I'm not sure I fully understand what you mean by this:

However, it does not update when the shielded app is already open and the ManagedSettingsStore.shield.applications is set to nil

When shield.applications is set to nil, no apps should be shielded (unless of course they're shielded because of their ActivityCategory).

ShieldConfigurationDataSource not refreshing when reactivated while shielded app is open
 
 
Q