<!--
{
  "availability" : [
    "iOS: 14.0.0 -",
    "iPadOS: 14.0.0 -",
    "macCatalyst: 14.0.0 -",
    "macOS: 11.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Screen Time",
  "identifier" : "/documentation/ScreenTime/STWebHistory/init(bundleIdentifier:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Screen Time"
    ],
    "preciseIdentifier" : "c:objc(cs)STWebHistory(im)initWithBundleIdentifier:error:"
  },
  "title" : "init(bundleIdentifier:)"
}
-->

# init(bundleIdentifier:)

Creates a web history instance to delete web-usage data associated to the
bundle identifier you specify.

```
init(bundleIdentifier: String) throws
```

## Parameters

`bundleIdentifier`

The bundle identifier.

## Discussion

The default value for `bundleIdentifier` is `Bundle.main.bundleIdentifier`.
This is the recommended identifier to use, except for example, if a helper
process is presenting web UI and you want to group that web-usage under the
main app’s bundle identifier.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)