init(resolvingBookmarkData:options:relativeTo:bookmarkDataIsStale:)
Creates a URL that refers to a location specified by resolving bookmark data.
Declaration
init(resolvingBookmarkData data: Data, options: URL.BookmarkResolutionOptions = [], relativeTo url: URL? = nil, bookmarkDataIsStale: inout Bool) throwsParameters
- 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 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.