Options used when resolving bookmark data.


struct BookmarkResolutionOptions


When resolving a bookmark, use bitwise OR operators to combine the options you want to specify, and provide them to the options parameter of the URLByResolvingBookmarkData:options:relativeToURL:bookmarkDataIsStale:error: method.


Security-scoped bookmarks are not available in versions of macOS prior to OS X 10.7.3.



init(rawValue: UInt)

Initializes a new resolution options structure.


static var withoutUI: NSURL.BookmarkResolutionOptions

Specifies that no UI feedback should accompany resolution of the bookmark data.

static var withoutMounting: NSURL.BookmarkResolutionOptions

Specifies that no volume should be mounted during resolution of the bookmark data.

static var withSecurityScope: NSURL.BookmarkResolutionOptions

Specifies that the security scope, applied to the bookmark when it was created, should be used during resolution of the bookmark data.


Conforms To

See Also

Working with Bookmark Data

class func bookmarkData(withContentsOf: URL) -> Data

Initializes and returns bookmark data derived from an alias file pointed to by a specified URL.

class func resourceValues(forKeys: [URLResourceKey], fromBookmarkData: Data) -> [URLResourceKey : Any]?

Returns the resource values for properties identified by a specified array of keys contained in specified bookmark data.

class func writeBookmarkData(Data, to: URL, options: NSURL.BookmarkFileCreationOptions)

Creates an alias file on disk at a specified location with specified bookmark data.

func startAccessingSecurityScopedResource() -> Bool

In an app that has adopted App Sandbox, makes the resource pointed to by a security-scoped URL available to the app.

func stopAccessingSecurityScopedResource()

In an app that adopts App Sandbox, revokes access to the resource pointed to by a security-scoped URL.

typealias NSURL.BookmarkFileCreationOptions

Options used when creating file bookmark data

struct NSURL.BookmarkCreationOptions

Options used when creating bookmark data.