Detecting When App Token Is Removed Due to Category Selection in FamilyActivityPicker

I'm working with the Screen Time API (FamilyActivityPicker) in SwiftUI and need help with a specific scenario.

I'm using the FamilyActivityPicker to let users select apps and categories to block. I save the previous selection (both applicationTokens and categoryTokens) locally. When the user updates their selection, I compare the new selection with the saved one to determine which apps or categories were removed.

However, I’m trying to handle a specific case: when an individual app token is removed from the selection because its entire category was selected instead. In this situation, even though the app is no longer in applicationTokens, it's still blocked due to its category being included in categoryTokens.

Since I need to show users which apps were actually removed, I want to avoid listing apps that are still indirectly blocked via a selected category. I’ve created a mapping between ApplicationToken and FamilyActivityCategoryToken to check whether a removed app is still covered by a selected category before displaying it.

Is there any way to check this using the current Screen Time APIs, or does the system not give access to the relationship between apps and their categories? Any help or suggestions would mean a lot!

Answered by Quappi in 849014022

does the system not give access to the relationship between apps and their categories

This is not possible unfortunately.

I desperately need the same functionality for my app as well.

A while ago I sent a feedback request / radar to Apple but haven’t heard anything back: FB16121372

I would urge you to file a feedback request as well:

  • Demonstrate your use-case.
  • Showcase how this would not affect user-privacy (you still don‘t know which app and category are represented by each token, you just know that they’re related).
  • Post your feedback number here as well 🙌

Let’s work on this together and shape the future of the Screen Time API – such an important topic nowadays that deserves more attention by Apple!

does the system not give access to the relationship between apps and their categories

This is not possible unfortunately.

I desperately need the same functionality for my app as well.

A while ago I sent a feedback request / radar to Apple but haven’t heard anything back: FB16121372

I would urge you to file a feedback request as well:

  • Demonstrate your use-case.
  • Showcase how this would not affect user-privacy (you still don‘t know which app and category are represented by each token, you just know that they’re related).
  • Post your feedback number here as well 🙌

Let’s work on this together and shape the future of the Screen Time API – such an important topic nowadays that deserves more attention by Apple!

A while ago I sent a feedback request … FB16121372

I can’t offer any concrete info about that, other than to confirm that it landed in the right place.

I would urge you to file a feedback request as well:

Agreed. I have a bunch of hints and tips about filing effective bug reports in Bug Reporting: How and Why?, but that list of suggestions from Quappi is spot on.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Detecting When App Token Is Removed Due to Category Selection in FamilyActivityPicker
 
 
Q