onevcat/XUPorter — pull request #8 by pronebird (2013-05-21 15:31:27+00:00)
Title: Fixing 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. Some of the comments are missing, e.g. XCConfigurationList and others that is pretty hard to resolve, but it seems that Unity doesn't use them anyway.

2. SerializeString whitelists two more chars '-', '/' that can be used in unescaped strings. Escaped Icons' filenames lead to unexpected 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 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.

Please test it and give me a feedback if this fix works for you. I can suggest you to .Backup() the project before append so you can compare old and modified projects using FileMerge or any other utility to see what's going on.