---
title: "fetchAllHistory(completionHandler:)"
framework: Screen Time
role: symbol
role_heading: Instance Method
platforms: [iOS 18.4+, iPadOS 18.4+, Mac Catalyst 18.4+, macOS 15.4+]
path: "screentime/stwebhistory/fetchallhistory(completionhandler:)"
---

# fetchAllHistory(completionHandler:)

Fetches all web history associated with the bundle identifier and profile identifier you specified during initialization.

## Declaration

```swift
func fetchAllHistory(completionHandler: @escaping @Sendable (Set<URL>?, (any Error)?) -> Void)
```

```swift
func fetchAllHistory() async throws -> Set<URL>
```
