On Jul 18, 2015, at 07:26 , SevenBits <[email protected]> wrote:
> 
> 1) Apple’s docs say that non-document based apps don’t get sandboxing support 
> automatically handled for them, requiring the manual use of the NSFile* APIs.

I’m not sure what you mean by “sandboxing” here — and in your thread title, 
since you’re clearly asking about sandboxed apps. Sandboxed apps get sandboxing 
support automatically, by definition, and they’re not non-sandboxed, by 
definition!

Anyway, I think you’ll find the answer in here:

        https://devforums.apple.com/thread/142513?start=0&tstart=0 
<https://devforums.apple.com/thread/142513?start=0&tstart=0>

but you have to read it very carefully because it winds around. If I understand 
it correctly, the answer is that if the main app has secure 
(sandbox-compatible) access to a NSURL, then you can send plain 
(non-security-scoped) bookmark data to an XPC process and it will have access 
too, when it reconstitutes the NSURL.

In particular, you should *not* send a security scoped bookmark to the XPC 
process, and you shouldn’t send a “suitable for bookmark file” bookmark either. 
Just a plain one.

(The access in the XPC process is “transient”, in the sense that it can’t save 
what it gets as a security-scoped bookmark for later sessions, it can only use 
the URL in its current session.)

_______________________________________________

Cocoa-dev mailing list ([email protected])

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 [email protected]

Reply via email to