Re: document-scoped bookmark
Re: document-scoped bookmark
- Subject: Re: document-scoped bookmark
- From: "J.E. Schotsman" <email@hidden>
- Date: Fri, 14 Jul 2017 22:56:36 +0200
> On 14 Jul 2017, at 22:20, Quincey Morris
> <email@hidden> wrote:
>
> On Jul 14, 2017, at 11:57 , J.E. Schotsman <email@hidden> wrote:
>>
>> I want to create document-scoped security bookmarks.
>> However, there seems to be no API for this.
>
> Huh? It’s described here:
>
> https://developer.apple.com/library/content/documentation/Security/Conceptual/AppSandboxDesignGuide/AppSandboxInDepth/AppSandboxInDepth.html#//apple_ref/doc/uid/TP40011183-CH3-SW16
>
> (under the heading “Security-Scoped Bookmarks and Persistent Resource
> Access”), plus this:
>
> https://developer.apple.com/library/content/documentation/Miscellaneous/Reference/EntitlementKeyReference/Chapters/EnablingAppSandbox.html#//apple_ref/doc/uid/TP40011195-CH4-SW18
>
> (“Enabling Security-Scoped Bookmark and URL Access”)
I had read all that, Quincey.
I decided to have a close look at the documentation for the
bookmarkData(options: NSURL.BookmarkCreationOptions = [],
includingResourceValuesForKeys keys: [URLResourceKey]?, relativeTo relativeURL:
URL?)
URL method and there it is:
“” relativeURL
The URL that the bookmark data will be relative to.
If you are creating a security-scoped bookmark to support App Sandbox, use this
parameter as follows:
• To create an app-scoped bookmark, use a value of nil.
• To create a document-scoped bookmark, use the absolute path (despite
this parameter’s name) to the document file that is to own the new
security-scoped bookmark. “"
Weird.
I am going to try it tomorrow.
Jan E.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden