Initializer

init(resolvingAliasFileAt:options:)

Returns a new URL made by resolving the alias file at url.

Declaration

convenience init(resolvingAliasFileAt url: URL, options: NSURL.BookmarkResolutionOptions = []) throws

Parameters

url

The URL pointing to the alias file.

options

Options taken into account when resolving the bookmark data. The withSecurityScope option is not supported by this method.

error

The error that occurred while trying to resolve the provided URL.

Return Value

A new URL created by resolving the bookmark data derived from the provided alias file. If an error occurs, this method returns nil.

Discussion

Creates and initializes a new URL based on the alias file at url. Use this method to resolve bookmark data that was saved using writeBookmarkData(_:to:options:) and resolves that data in one step.

If the url argument does not refer to an alias file as defined by the NSURLIsAliasFileKey property, this method returns the url argument.

If the url argument is unreachable, this method returns nil and the optional error argument is populated.