Function

CFURLStopAccessingSecurityScopedResource(_:)

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

Declaration

func CFURLStopAccessingSecurityScopedResource(_ url: CFURL!)

Parameters

url

The security-scoped URL that points to the file-system resource you want to stop accessing.

Discussion

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 function (or its Cocoa equivalent, stopAccessingSecurityScopedResource()) on the URL.

See Also

Working with Bookmark Data

func CFURLCreateBookmarkDataFromAliasRecord(CFAllocator!, CFData!) -> Unmanaged<CFData>!

Initializes and returns bookmark data derived from an alias record.

func CFURLCreateBookmarkDataFromFile(CFAllocator!, CFURL!, UnsafeMutablePointer<Unmanaged<CFError>?>!) -> Unmanaged<CFData>!

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

func CFURLStartAccessingSecurityScopedResource(CFURL!) -> Bool

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

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software