• 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
Re: Sandboxing. WTF?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Sandboxing. WTF?


  • Subject: Re: Sandboxing. WTF?
  • From: Michael Nickerson <email@hidden>
  • Date: Wed, 30 May 2012 10:56:07 -0400

On May 28, 2012, at 5:51 AM, Graham Cox <email@hidden> wrote:

>
> That sounds fine, except that CFPreferencesCopyAppValue doesn't take a path, just a bundle ID and key. I can't see an alternative API that takes a path - are you saying I have to open the file and parse it myself? While that isn't too hard, it seems to be going against the point of having an API for preferences which isolate you from format changes and file system details and so on.
>
> --Graham
>
>
>

The CFPreferences... calls will actually take a path. Just give it the path where the bundle ID should go. This is not documented anywhere, but it works.

If you'd rather not count on that always working, you don't have to parse the plist yourself, just read the plist in as data and use NSPropertyListSerialization (or CFPropertyList, if you need the CF calls for some reason) to parse it.


(Sorry if a blank email also got sent; I fat-fingered something while selecting text on my iPad and am not sure if it sent or was canceled.)


------------------

Michael Nickerson
http://www.nightproductions.net
_______________________________________________

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: Sandboxing. WTF?
      • From: Graham Cox <email@hidden>
    • Re: Sandboxing. WTF?
      • From: Jean-Daniel Dupas <email@hidden>
References: 
 >Sandboxing. WTF? (From: Graham Cox <email@hidden>)
 >Re: Sandboxing. WTF? (From: Fritz Anderson <email@hidden>)
 >Re: Sandboxing. WTF? (From: Graham Cox <email@hidden>)
 >Re: Sandboxing. WTF? (From: Quincey Morris <email@hidden>)
 >Re: Sandboxing. WTF? (From: Graham Cox <email@hidden>)
 >Re: Sandboxing. WTF? (From: Marco S Hyman <email@hidden>)
 >Re: Sandboxing. WTF? (From: Graham Cox <email@hidden>)
 >Re: Sandboxing. WTF? (From: Jean-Daniel Dupas <email@hidden>)
 >Re: Sandboxing. WTF? (From: Graham Cox <email@hidden>)
 >Re: Sandboxing. WTF? (From: Roland King <email@hidden>)
 >Re: Sandboxing. WTF? (From: Graham Cox <email@hidden>)

  • Prev by Date: Re: Sandboxing. WTF?
  • Next by Date: Re: NSDocument never deallocated with autosave/versions
  • Previous by thread: Re: Sandboxing. WTF?
  • Next by thread: Re: Sandboxing. WTF?
  • Index(es):
    • Date
    • Thread