Thanks Scott and Jens for sharing your thoughts.

I didn't set up entitlements (yet), but when launched from within Xcode, my 
(non-sandboxed Cocoa) app was able to read and clear  
~/Library/Preferences/com.apple.LaunchServices.QuarantineEventsV2  created by 
system. However, when launched from Finder, the app launches and doesn't do 
anything — I'm checking the console log file (my thanks to Todd Haberlein for 
the tip) and also developing an alternative approach using sqlite and 3rd party 
wrappers (my thanks to Jerry Krinock, Robert Martin, and Jens Alfke for 
suggesting).

This experience has definitely piqued my curiosity about the difference in 
"access rights" of an app launched from within Xcode. I would expect difference 
in app behavior for an iOS app launched on device versus simulator, but am 
baffled by the difference in behavior of launching the same OS X app in Xcode 
versus from the Finder.

Thanks to everyone from sharing, I'm still exploring and welcome any other 
suggestion.

- Chris

On Jul 27, 2013, at 5:26 AM, Scott Ribe <scott_r...@elevated-dev.com> wrote:

> On Jul 26, 2013, at 1:36 PM, Jens Alfke <j...@mooseyard.com> wrote:
> 
>> I've never worked with sandboxing, but I would guess that a sandboxed app 
>> can't access arbitrary files in ~/Library/Preferences, but instead has to go 
>> through NSUserDefaults.
> 
> Don't know about iOS, but at least on OS X you can do this, depending on the 
> definition of arbitrary. In other words, you can set up entitlements to 
> specific files in preferences that are not named by your bundle identifier, 
> as would be necessary for shared preferences between a suite of apps. But of 
> course you can't give yourself an entitlement to ~/Library/Preferences and 
> then wander through the whole directory.
> 
> -- 
> Scott Ribe
> scott_r...@elevated-dev.com
> http://www.elevated-dev.com/
> (303) 722-0567 voice
> 
> 
> 
> 
> 
> _______________________________________________
> 
> 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/mailbox20040630%40gmail.com
> 
> This email sent to mailbox20040...@gmail.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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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

Reply via email to