Screen Time API: ApplicationToken Mismatch / Randomization in Extensions

Description: I am developing a digital well-being application using the Screen Time API (FamilyControls, ManagedSettings, and DeviceActivity). I am encountering a critical issue where the ApplicationToken provided by the system to my app extensions suddenly changes, causing a mismatch with the tokens originally stored by the main application.

The Problem: When a user selects applications via FamilyActivityPicker, we persist the FamilyActivitySelection (and the underlying ApplicationToken objects) in a shared App Group container. However, we are seeing frequent cases where the token passed into:

ShieldConfigurationDataSource.configuration(shielding:in:)

ShieldActionDelegate.handle(action:for:completionHandler:)

...does not match (using ==) any of the tokens previously selected and stored.

IOS version: 26.2.1

Screen Time API: ApplicationToken Mismatch / Randomization in Extensions
 
 
Q