I don't think that the access rights are permanent, the only way to enable 
sandboxing for this kind of app would be to use a temporary exception 
entitlement giving your app access to the whole file system (not sure if Apple 
will like that for the Mac App Store, though).

You can copy your application support folder to the sandbox container (read the 
Code Signing and Application Sandboxing Guide on this, the chapter on migrating 
existing application files to an app sandbox, 
http://developer.apple.com/library/mac/#documentation/Security/Conceptual/CodeSigningGuide/Migration/Migration.html).
 

Tim

Am 20.09.2011 um 06:26 schrieb Peter N Lewis:

> Questions:
> 
> * When the user opens/drags a file to me application, is the explicit 
> entitlement to read that file that I'm granted permanent?  Will it remain 
> across launch/reboots?
> 
> * How do I deal with files that I already have a reference to if I enable 
> sandboxing in a future version?
> 
> * What happens to my existing Application Support folder if I enable 
> sandboxing in a future version?
> 
> Background:
> 
> I'm looking at what I'll need to do to sandbox some of my lesser apps 
> (clearly Keyboard Maestro is impossible under sandboxing rules).  One of my 
> apps (Desktop Calendar Maker) keeps references (paths) to images.  The paths 
> are stored in the apps preferences file.  The user gets the file references 
> using either Open or Drag.
> 
> So my application already exists and has references to images on the users 
> harddisk.  If I enable sandboxing, presumably I'm going to lose access to 
> those files.  I could potentially release an interim version that copies the 
> files into my application support folder, but if I then enable sandboxing, 
> I'll probably lose access to my existing application support folder (or is it 
> moved/copied automatically?).
> 
> This is quite a simple application, with minimal need to access stuff outside 
> the sandbox, and yet I'm very confused as to how to enable sandboxing without 
> losing the existing users data.
> 
> Any advice on the best way forward would be greatly appreciated.
> 
> Thanks,
>   Peter.
> 
> -- 
> New release: Keyboard Maestro 5.0 with control flow, variables, calculations, 
> macro library and more.
> 
> Keyboard Maestro <http://www.keyboardmaestro.com/> Macros for your Mac
> <http://www.stairways.com/>           <http://download.stairways.com/>
> 
> 
> 
> 
> _______________________________________________
> 
> 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:
> http://lists.apple.com/mailman/options/cocoa-dev/tim%40timschroeder.net
> 
> This email sent to t...@timschroeder.net

_______________________________________________

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

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

Reply via email to