ShieldConfiguration does not update when token is moved from one store to another (while app in foreground)

Hello fellow Screen Time Fans!

I am encountering a strange problem since I started working with the Screen Time framework, and I don’t know what I’m doing wrong:

Imagine the app has two ManagedSettingsStores: one to block apps during work hours (let’s say from 9am to 5pm) and one to block apps in the evening (let’s say from 5:30pm till midnight).

Imagine, the user has blocked Instagram in both.

When the user has Instagram open at 4:59pm it shows the Block during Work Hours Shield (so far, so good).

At 5pm, the shield is removed, and the user can use Instagram.

Then, at 5:30 the a shield is activated again: this time, the Instagram token is added to the evening store.

However, there is no new ShieldConfiguration requested from the ShieldConfigurationDataSource.

Instead, the previous shield from the work hour block is re-used and shown.

To me, it appears that the Framework does not request new shields, when the token is moved from one store to another while the app remains in foreground.

The Shield is only re-rendered when the user closes the shielded app and re-opens it.

This is really confusing behavior and I would like to fix it.

Did anyone here encounter something similar, and has a suggestion or workaround?

My feedback is also documented in FB14237883.

We will follow up in your bug report.

ShieldConfiguration does not update when token is moved from one store to another (while app in foreground)
 
 
Q