Fix issue #3

There's a set of commits in this pull request which fixes Unity append mode. 

1. The major issues were with comments, at least those in PBXBuildFile and PBXFileReference sections are used by Unity somehow, maybe as markers for regexp parser, or maybe used to extract the information about guid.

2. There is no logic in when Unity escapes (puts quotes) around parameters in Xcode project and when not, the best option so far was to skip quotes, therefore SerializeString whitelists two more chars '-', '/' that can be used in unescaped strings. Escaped Icons' filenames lead to incorrect behaviour, e.g. Unity adds "Libraries" to Icon path, etc.

3. I added simple resolver that can return the name of group or build phase where file placed at, etc. Resolver iterates over all files and finds the relations between files, groups and build phases once before pbxproj export.

4. There are some hacks in code to force spacing even when "readable = false", just because I couldn't figure out how to make it better having only one boolean flag but bunch of cases. I believe Unity should use XUPorter to parse and modify Xcode project or develop their own parser which is able to handle file semantics rather than how spaces are positioned in file.

5. In comments, PBXProject displayed as PBXDictionary in pbxproj, because in Consolidate we pass Dictionary instead of object. Potential issue.

6. XCBuildConfiguration, XCConfigurationList sections don't have comments, which can be potential issue in future, but so far Unity does not show any interest in those.


This fix works for me and append doesn't even apply any changes to the project. Please test it and give me a feedback if this fix works for you. I would suggest you to .Backup() the project before append so you can compare old and modified projects using FileMerge/diff or any other utilities to see what's going on.