I'm building a Cocoa app (using OS X 10.8 SDK) to access a file (that was not 
created or owned by my app) in ~/Library/Preferences/.  

I'm able to access the ~/Library/Preferences from a non-sandboxed app, however 
when I run my NSTask from my sandboxed app, the path returned is 
/Users/username/Library/Containers/com.companyname.Download-Log/Data/Library/Preferences/com.apple.LaunchServices.QuarantineEventsV2:
 No such file or directory

At this point I'm guessing the above error message is a result of not finding 
the preference file I want in my app's sandbox rather than because NSTask 
(running from within my app) has no access to that preference file. Reading 
page 36 of the App Sandbox Design Guide suggests that "Preferences for other 
sandboxed apps are inaccessible".

I've created an entitlement file. So my question is is it possible to use a 
container migration manifest to copy the file (that was not created or owned by 
my app) from ~/Library/Preferences to my app's sandbox. I only need read access 
and need not modify or write that preference file back out to 
~/Library/Preferences.

Thanks for any pointers and suggestions.
_______________________________________________

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

Reply via email to