• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Sandoxing: Creating a security-scoped bookmark for contents of a user-specified directory.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Sandoxing: Creating a security-scoped bookmark for contents of a user-specified directory.


  • Subject: Sandoxing: Creating a security-scoped bookmark for contents of a user-specified directory.
  • From: douglas welton <email@hidden>
  • Date: Wed, 13 Jun 2012 15:14:26 -0400

Hi All,

My application allows the user to navigate to a directory and read a collection of image files. Once read, the user can arbitrarily keep any subset of the acquired images.

Currently (un-sandboxed), I use NSFileManager to get the URLs for the files in the directory. I store the returned URLs in my document data. When I sandbox this app, using the stored URLs can be a no-op (unless they are in an entitlement-friendly location: e.g., the Pictures folder).

I have tried creating security-scoped bookmarks before storing the individual URLs.  However,  when I do this, I get a nil bookmark and the message "XPC couldn't look up the Mach service for scoped bookmarks agent" is posted to the console.

In order to play in the sandbox, I need a persistent security-scoped solution for URLs derived from a user-selected URL.

From what I read in the App Sandbox Design guide, this is not possible.  Am I correct?  Can anyone else who's run into this situation give me a pointer/hint/suggestion about a work around?

curiously,

douglas


_______________________________________________

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

  • Follow-Ups:
    • Re: Sandoxing: Creating a security-scoped bookmark for contents of a user-specified directory.
      • From: Mike Abdullah <email@hidden>
    • Re: Sandoxing: Creating a security-scoped bookmark for contents of a user-specified directory.
      • From: Tim Schröder <email@hidden>
  • Prev by Date: Re: OS constant cause "32-bit RIP relative reference out of range" linker error on x64
  • Next by Date: Re: Sandoxing: Creating a security-scoped bookmark for contents of a user-specified directory.
  • Previous by thread: Re: OS constant cause "32-bit RIP relative reference out of range" linker error on x64
  • Next by thread: Re: Sandoxing: Creating a security-scoped bookmark for contents of a user-specified directory.
  • Index(es):
    • Date
    • Thread