Re: reading preferences from com.apple.mail under 10.8
Re: reading preferences from com.apple.mail under 10.8
- Subject: Re: reading preferences from com.apple.mail under 10.8
- From: Mike Abdullah <email@hidden>
- Date: Thu, 02 Aug 2012 19:27:37 +0100
On 2 Aug 2012, at 13:47, Rob McBroom <email@hidden> wrote:
> On Aug 2, 2012, at 3:07 AM, Shane Stanley <email@hidden> wrote:
>
>> On 01/08/2012, at 1:07 AM, Rob McBroom <email@hidden> wrote:
>>
>>> Mail is, but so is TextEdit and I have no problem reading its prefs.
>>
>> Are you sure you have no problem with TextEdit? It looks like when Mail moves its prefs to its container it deletes the old file, but TextEdit leaves its old one there. You may well be reading a pre-update TextEdit prefs file.
>
>
> I was all ready to say “Yes, I’m sure”, but the app isn’t actually reading TextEdit’s prefs. It’s asking for com.apple.TextEdit.LSSharedFileList. Reading the actual preferences doesn’t seem to work.
>
> So maybe you can’t read the prefs from a sandboxed application? But that isn’t documented anywhere that I can find.
Correct, sandboxed apps live in their own container, with their own preferences file. There is a temporary entitlement:
com.apple.security.temporary-exception.shared-preference.read-only
Use that as the key, and the bundle identifier of an app as the value. This will allow a sandboxed app to read another app's preferences. I don't know if the reverse applies though, having not had a need to try it.
_______________________________________________
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