How to shield categories with the ManagedSettingsStore?

Hello,

I am not quite sure, how the shielding of entire categories of apps is supposed to work. The FamilyActivitySelection contains tokens for apps, websites and categories.

But the shield property of ManagedSettingsStore has only attributes applications and webDomains where I can configure the tokens from the family activity selection.

shield.applications = selection.applicationTokens
shield.webDomains = selection.webDomainTokens

I would expect there to be the property categories that expects Set<ActivityCategoryToken> and based on this shields apps in that category.

ManagedSettingsStore has 2 different settings for shielding categories: shield.applicationCategories and shield.webDomainCategories. Both of these settings take an ActivityCategoryPolicy, which is an enumeration with 3 cases: none, specific and all.

Using the category tokens from the FamilyActivitySelection, you can block specific application and web domain categories with the .specific ActivityCategoryPolicy like so:

store.shield.applicationCategories = .specific(selection.categoryTokens)
store.shield.weDomainCategories = .specific(selection.categoryTokens)

For more information, please refer to the ManagedSettings documentation

How to shield categories with the ManagedSettingsStore?
 
 
Q