Skip to content

Conversation

@thisislvca
Copy link
Contributor

Summary

This PR adds first-class web content filtering to react-native-device-activity, focused on blocking adult/explicit websites with Apple’s built-in filtering policies.

Why

A common Screen Time use case is to allow normal app/category behavior while still blocking adult/explicit websites.
Before this change, the package supported shielding and app/category controls, but did not expose Apple’s web content filter policy as a dedicated API.

What’s included

  • New public policy input type:
    • WebContentFilterPolicyInput with none, auto, specific, and all modes.
  • New JS/native APIs:
    • setWebContentFilterPolicy(policy, triggeredBy?)
    • clearWebContentFilterPolicy(triggeredBy?)
    • isWebContentFilterPolicyActive()
  • Action support for background/scheduled execution:
    • setWebContentFilterPolicy
    • clearWebContentFilterPolicy
  • iOS native implementation for parsing, normalization, validation, and applying policy via ManagedSettings web content controls.
  • Strict validation and limits (including Apple’s 50-domain limits per policy mode).
  • README updates with usage examples and key Apple documentation links.
  • Example app updates (AllTheThings) to manually test apply/clear/status for web filter policies.
  • Test coverage additions for TypeScript wrappers and iOS policy parsing/action behavior.

Notes

  • The web content policy is intentionally independent from existing shield/block-all behavior.
  • This enables adult/explicit website filtering as a standalone policy or as part of schedule-driven actions.

@pkg-pr-new
Copy link

pkg-pr-new bot commented Feb 10, 2026

Open in StackBlitz

npm i https://pkg.pr.new/kingstinct/react-native-device-activity@86

commit: d0f0186

@thisislvca
Copy link
Contributor Author

Side note, I'm actively using this in my app, would love to see it merged & released when possible

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant