Search code examples
xcodeparsingsyntaxmarkup

What type of markup is an XCode project?


I am trying to find a parser for an xcode project, but I don't recognize the type of markup.

An example of the format:

// !$*UTF8*$!
{
    <KEY> = <VALUE>;
    <KEY> = <VALUE>;

    <KEY> =
    {
        <KEY> =
        {
            <KEY> = <VALUE>;
            <KEY> = <VALUE>;
            <KEY> = <VALUE>;
        };

        <KEY> = ( <VALUE>, <VALUE>, <VALUE>, <VALUE>, );
    };
}

What type of markup is this?


Solution

  • That's an old-style property list before Apple switched to xml-style property lists. You can read that in using NSDictionary/NSArray +<dictionary/array>WithContentsOfFile:, using the appropriate class based on if your property list's base object is an array (values separated by commas enclosed by parentheses) or a dictionary (key-value pairs enclosed by curly braces). If you get nil back you know you've chosen the wrong one.

    +<collection>WithContentsOfFile: will turn the entire file into Foundation framework objects.