Skip to main content

Blocking

Apps & Categories

blockSelection(selectionId: string)

Shield every app, category, and web domain in a stored selection. The selection is created by the <ActivityPicker /> under the same ID.

// 1. The user picked apps in <ActivityPicker selectionId="my-blocklist" />
// 2. Apply the shield:
ExpoScreenTime.blockSelection('my-blocklist');

Throws if no selection exists under that ID.

unblockAll()

Remove all blocks applied via blockSelection() (also clears web-domain filters).

ExpoScreenTime.unblockAll();

isBlocked(): boolean

Whether anything is currently shielded — reflects the real ManagedSettings state, not what you last asked for.

const blocked = ExpoScreenTime.isBlocked();

Web Domains

Block specific domains without user selection (independent from blockSelection's domain shields).

blockWebDomains(domains: string[])

ExpoScreenTime.blockWebDomains(['facebook.com', 'instagram.com', 'tiktok.com']);

unblockWebDomains(domains: string[])

ExpoScreenTime.unblockWebDomains(['facebook.com']);

unblockAllWebDomains()

ExpoScreenTime.unblockAllWebDomains();

getBlockedWebDomains(): string[]

Domains currently blocked via blockWebDomains().

const domains = ExpoScreenTime.getBlockedWebDomains();
// ['facebook.com', 'tiktok.com']