Importing
import ExpoScreenTime, {
// Hooks
useScreenTimePermissions,
useMonitorEvents,
// Components
ActivityPicker,
DeviceActivityReport,
TokenLabel,
ApplicationLabel,
CategoryLabel,
WebDomainLabel,
// Selection utilities (also available on the default export)
listSelections,
getTokens,
deleteSelection,
} from 'expo-screen-time';
The default export (ExpoScreenTime) holds all the imperative functions
documented in this section. Hooks, components, and the selection utilities are
named exports.
The selectionId model
Apple's Screen Time tokens are opaque and never readable from JavaScript. Every
API that works with a set of apps/categories/domains references a selection
stored natively, addressed by a selectionId string that you choose:
- Render
<ActivityPicker selectionId="my-blocklist" />— the user's choice is saved natively under that ID. - Pass the same ID to the imperative APIs:
blockSelection("my-blocklist"),startMonitoring({ selectionId: "my-blocklist", ... }). - Inspect it with the selection utilities — counts, opaque token handles, set operations.
JS never sees token contents — only counts (SelectionMetadata) and opaque
TokenHandles used to render
labels or remove individual tokens.