Type Method

resourceValuesForKeys:fromBookmarkData:

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

Declaration

+ (NSDictionary<NSURLResourceKey, id> *)resourceValuesForKeys:(NSArray<NSURLResourceKey> *)keys fromBookmarkData:(NSData *)bookmarkData;

Parameters

keys

An array of names of URL resource properties. In addition to the standard, system-defined resource properties, you can also request any custom properties that you provided when you created the bookmark. See the bookmarkDataWithOptions:includingResourceValuesForKeys:relativeToURL:error: method for details.

bookmarkData

The bookmark data from which you want to retrieve resource values.

Return Value

A dictionary of the requested resource values contained in bookmarkData.

See Also

Working with Bookmark Data

+ bookmarkDataWithContentsOfURL:error:

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

- bookmarkDataWithOptions:includingResourceValuesForKeys:relativeToURL:error:

Returns a bookmark for the URL, created with specified options and resource values.

+ writeBookmarkData:toURL:options:error:

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

- startAccessingSecurityScopedResource

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

- stopAccessingSecurityScopedResource

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

NSURLBookmarkFileCreationOptions

Options used when creating file bookmark data

NSURLBookmarkCreationOptions

Options used when creating bookmark data.

NSURLBookmarkResolutionOptions

Options used when resolving bookmark data.