<!--
{
  "availability" : [
    "iOS: 8.0.0 -",
    "iPadOS: 8.0.0 -",
    "macCatalyst: 8.0.0 -",
    "macOS: 10.10.0 -",
    "swift: 4.2.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/URL/init(resolvingBookmarkData:options:relativeTo:bookmarkDataIsStale:)-3ic6f",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "s:10Foundation3URLV21resolvingBookmarkData7options10relativeTo08bookmarkE7IsStaleAcA0E0Vh_So30NSURLBookmarkResolutionOptionsVACSghSbztKcfc"
  },
  "title" : "init(resolvingBookmarkData:options:relativeTo:bookmarkDataIsStale:)"
}
-->

# init(resolvingBookmarkData:options:relativeTo:bookmarkDataIsStale:)

Creates a URL that refers to a location specified by resolving bookmark data.

```
init(resolvingBookmarkData data: Data, options: URL.BookmarkResolutionOptions = [], relativeTo url: URL? = nil, bookmarkDataIsStale: inout Bool) throws
```

## Parameters

`data`

The bookmark data used to construct a URL.

`options`

Options taken into account when resolving the bookmark data.

    To resolve a security-scoped bookmark to support App Sandbox, include the [`withSecurityScope`](/documentation/Foundation/NSURL/BookmarkResolutionOptions/withSecurityScope)     option.

`url`

The base URL that the bookmark data is relative to.

    If you’re resolving a security-scoped bookmark to obtain a security-scoped URL, use this parameter as follows:

- To resolve an app-scoped bookmark, use a value of `nil`.
- To resolve a document-scoped bookmark, use the *absolute* path (despite this parameter’s name) to the document from which you retrieved the bookmark.

    App Sandbox doesn’t restrict which URL values you can pass to this parameter.

`bookmarkDataIsStale`

On return, if `true`, the bookmark data is stale. Your app should create a new bookmark using the returned URL and use it in place of any stored copies of the existing bookmark.

## Discussion

---

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)