Looking for a formal specification for .pbxproj files
I need to rea开发者_Go百科d / write Xcode project definition files (myproject.xcodeproj/project.pbxproj) - is there any formal specification of the file format which I can use to create a parser?
You can start with this introduction. Then look at some kind of reference here.
There is also Apple's description of core concepts (projects, targets, workspaces, schemes).
As best I know, it is an internal implementation detail of Xcode. It would be surprising if there were a formal definition.
pbxproj files seem to be implemented using some internal implementation of NSCoder; "isa" is Objective-C's internal name for a "class name", and the mention of "archive" reminds of NSArchiver/NSKeyedArchiver, concrete implementations of NSCoder.
pbxproj looks like an archive of a dictionary of objects which probably serve as Xcode's internal in-memory model of project. It refers to numerous class names which seem to be Xcode's model classes.
I am unaware of a formal spec of either the archive format nor the classes. That is what I came to ask on SO today in fact: which NSCoder is here used by Apple. On the other hand, writing something that would decode this object tree, and then identify the purpose and connections between objects, is how I was going to proceed.
精彩评论