Creating Plists / How is the <data> value generated?

  • I'm looking for what is used to generate the <data> values in plist's. For
    example. if you check "Open with rosetta" from an Application's "get info".
    It puts an entry in com.apple.LaunchServices.plist under
    LSPrefsFatApplications. What is it putting in the <data> field?

    If you use plutil to convert the file to xml, you'll see some sort of hash.
    Where can I find out how that is generated, or some more resources?

    I've been doing some research and know that the <data> represents a CFData
    object, but what in this case is creating the values in this situation?

    I've also figured out that the <data> is base64 encoded. So take this for
    example:

    <key>org.mozilla.firefox</key>
    <array>
    <data>
    AAAAAACiAAMAAQAAwXGNSQAASCsAAAAAAAAAFgAH3LUAAMGaoMwA
    AAAACSD//gAAAAAAAAAA/////wABAAQAAAAWAA4AGAALAEYAaQBy
    AGUAZgBvAHgALgBhAHAAcAAPABoADABNAGEAYwBpAG4AdABvAHMA
    aAAgAEgARAASABhBcHBsaWNhdGlvbnMvRmlyZWZveC5hcHAAEwAB
    LwD//wAA
    </data>
    </array>

    When I bas64 decode this I'm getting this:

    <quote>
    ¢  à q IH+  Üµà š ÃŒ        ÿþÿÿÿÿ      Firefox.app  Macintosh
    HD  Applications/Firefox.app  /ÿÿ
    </quote>

    So I need some help figuring out what else is a factor when these data
    values are first created.

    I've also been having a hunch that possibly the data is the contents of an
    alias record or AliasHandle?

    Any ideas would be awesome!!!!!
  • On 9/15/07, aaron smith <beingthexemplarylists...> wrote:

    > So I need some help figuring out what else is a factor when these data
    > values are first created.
    >
    > I've also been having a hunch that possibly the data is the contents of an
    > alias record or AliasHandle?
    >
    > Any ideas would be awesome!!!!!

    Likely it is an AliasHandle.

    <http://developer.apple.com/qa/qa2004/qa1350.html>
    <http://www.cocoabuilder.com/archive/message/cocoa/2003/4/21/77658>

    -Shawn
  • On Sep 15, 2007, at 4:01 PM, Shawn Erickson wrote:

    > On 9/15/07, aaron smith <beingthexemplarylists...> wrote:
    >
    >> I'm looking for what is used to generate the <data> values in
    >> plist's. For
    >> example. if you check "Open with rosetta" from an Application's
    >> "get info".
    >> It puts an entry in com.apple.LaunchServices.plist under
    >> LSPrefsFatApplications. What is it putting in the <data> field?
    >>
    >> [snip]
    >>
    >> So I need some help figuring out what else is a factor when these
    >> data
    >> values are first created.
    >>
    >> I've also been having a hunch that possibly the data is the
    >> contents of an
    >> alias record or AliasHandle?
    >>
    >> Any ideas would be awesome!!!!!
    >
    > Likely it is an AliasHandle.
    >
    > <http://developer.apple.com/qa/qa2004/qa1350.html>
    > <http://www.cocoabuilder.com/archive/message/cocoa/2003/4/21/77658>

    Given that it's a private plist, it might contain anything, including
    a combination of an alias and something else. The better answer is
    that it's dangerous to go playing in others' plists - particularly in
    data blobs - since they can change on a whim. Depending on what he
    actually wants to do, there may be a more supported method for
    getting there than hacking a plist.

    steve
previous month september 2007 next month
MTWTFSS
          1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
Go to today