Instance Method


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


- (void)stopAccessingSecurityScopedResource;


When you no longer need access to a file or directory pointed to by a security-scoped URL, such as one returned by resolving a security-scoped bookmark, call this method (or its Core Foundation equivalent, the CFURLStopAccessingSecurityScopedResource function) on the URL to relinquish access. When you call this method, you immediately lose access to the resource in question.

If you call this method on a URL whose referenced resource you do not have access to, nothing happens.

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.

+ resourceValuesForKeys:fromBookmarkData:

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

+ 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.


Options used when creating file bookmark data


Options used when creating bookmark data.


Options used when resolving bookmark data.