ManagedSettingsStore shield 50 token limit

Hello!

I'm currently making an app that involves the Screen Time API. I have the required entitlements and capabilities added, both in Xcode and the developer portal, and I've requested, got, and enabled the Family Controls (Distribution) entitlement. I am using requestAuthorization(for: .individual) for the API.

I'm encountering a problem with the shield settings within ManagedSettingsStore, I can't seem to have the store shield over 50 apps (app tokens) or 50 websites (web tokens). If I assign store.shield.applications or store.shield.webDomains with over 50 items each, then the store will not shield any items and calling these variables returns nil for both.

I am using ManagedSettingsStore(named: _) and I have 12 ManagedSettingsStore.Name items in total.

As long as there are 50 apps and/or 50 websites under any shield, or combined from multiple shields, then no other shields from other stores will be able to shield apps or websites.

I can't seem to find information about this online, and I'm thinking that I'm likely using the API wrong. I encountered this both on iOS 16 and the iOS 17 betas, and Xcode 14.3+ and the Xcode 15 betas. (I did not start the project until Xcode 14.3 was released)

Thanks.

Not that this helps, but I can confirm this is still an issue in iOS 17.2 (public release). 50 or less works perfectly, 51+ tokens doesn't block any apps. I don't think you're using the API incorrectly, just that there's currently an internal limit.

You can reduce this by using category tokens, but this isn't always ideal if you want to unblock a single app from the category, the user has to specify this in the Family Activity Picker.

ManagedSettingsStore shield 50 token limit
 
 
Q