Enabling Security-Scoped Bookmark and URL Access

Enabling Security-Scoped Bookmark and URL Access

Enabling Security-Scoped Bookmark and URL Access Enable sandboxed apps to use security-scoped bookmark data.

Overview

If you want to provide your sandboxed app with persistent access to file-system resources, you must enable security-scoped bookmark and URL access. Security-scoped bookmarks are available starting in macOS v10.7.3.

To add the bookmarks.app-scope or bookmarks.document-scope entitlement, edit your app’s  .entitlements property list file using the Xcode property list editor. Based on the type of access you want, use the entitlement keys shown in the table below. Use a value of true for each entitlement you want to enable. You can enable either or both entitlements.

For more information on security-scoped bookmarks, see Security-Scoped Bookmarks and Persistent Resource Access in App Sandbox Design Guide.

| Entitlement key        | Description | | --- | --- | | com.apple.security.files.bookmarks.app-scope | Enables use of app-scoped bookmarks and URLs. | | com.apple.security.files.bookmarks.document-scope | Enables use of document-scoped bookmarks and URLs. [IMAGE]: spacer Version note: In macOS v10.7.3, this entitlement key was named com.apple.security.files.bookmarks.collection-scope. |