Library for dealing with project files (*.xcodeproj/*.pbxproj) in AppCode

Hi there!

For some nifty reason I need to implement a (hopefully) open source tool that changes .pbxproj files (adds some refs, deps, changes params, etc) without breaking the whole file. Unfortunately Apple doesn't like other devs dealing with the old plist style files so it's quite hard to write an .xcodeproj file in old format. And I don't want to change its structure a lot to simplify merges between branches (i.e., all the Xcode generated comments should be preserved, etc).

As far as I can see, AppCode is one of the IDEs that can write the .pbxproj files correctly. Do you use a specific library for that? I wasn't able to find a good one. In case you use your own implementation, aren't you going to release it to the open source world? The only things needed are the model and filters for the .pbxproj files. It should be a tiniest part of the AppCode :)


If it's not possible (which I am afraid of) I'll need to go the hard way and implement such lib from scratch. Do you have any suggestions for me? Do I miss an easy way to do .pbxproj modifications?

3 comments
Comment actions Permalink

Sergey,
currently, we don't have plans to release any public library.
I suggest contacting CocoaPods (http://cocoapods.org/) folks - they do project modification and, probably, have public code for this.

0
Comment actions Permalink

These guys are using CoreFoundation API to write kCFPropertyListXMLFormat_v1_0 formatted plist and the usual .pbxproj is

in kCFPropertyListOpenStepFormat. According to the Foundation documentation "
The
NSPropertyListOpenStepFormat
constant is not supported for writing. It can be used only for reading old-style property lists.
" (NSPropertyListOpenStepFormat is a mapping for 
kCFPropertyListOpenStepFormat
). I'll recheck the CF version but I doubt it will work and even if it does I doubt it preserves the comments, order, etc.


Anyway, thanks for an answer! :)
0
Comment actions Permalink

I see,
try reaching Jasper Blues - he once mentioned that he worked on an Xcode project editor (see http://youtrack.jetbrains.com/issue/OC-2744, http://youtrack.jetbrains.com/issue/OC-2797).

0

Please sign in to leave a comment.