Re: document-scoped bookmark

2017-07-14 Thread J.E. Schotsman

> On 14 Jul 2017, at 22:20, Quincey Morris 
> <quinceymor...@rivergatesoftware.com> wrote:
> 
> On Jul 14, 2017, at 11:57 , J.E. Schotsman <jesc...@xs4all.nl> 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 (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: document-scoped bookmark

2017-07-14 Thread Quincey Morris
On Jul 14, 2017, at 11:57 , J.E. Schotsman  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”)

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


document-scoped bookmark

2017-07-14 Thread J.E. Schotsman
Hello,

I want to create document-scoped security bookmarks.
However, there seems to be no API for this.

On StackOverflow I’ve found two conflicting views:
1. Too bad, never implemented by Apple
2. Create the bookmark relative to the document.

Can somebody please shed some light on this?

TIA,

Jan E.
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com