xcs2 (the next generation of this tool) is available here
While building/cleaning Xcode project from command line is trivial task (hint: xcodebuild), managing the project content used to be the hard one. xcs is supposed to solve this problem: it provides a minimal set of tasks for adding/removing files for existing Xcode projects.
thor install https://github.com/gonzoua/xcs/raw/master/xcs.thor
Get full list of tasks using command
- xcs:add File [Group] Add file to a group. By default adds to "Source"
- xcs:help [TASK] Describe available tasks or one specific task
- xcs:list [--verbose] List project contents
- xcs:mkgroup Group Create new subgroup in root group
- xcs:rm Group/File Remove file reference from a project
- xcs:rmgroup Group Remove Group
Just cd to your project directory and run
You'll get something like this:
Using /Users/gonzo/Projects/EPUBToolkit/EPUBToolkit.xcodeproj EPUBToolkit/ EPUBFile.h EPUBFile.m Source/ main.m Documentation/ EPUBToolkit.1 Products/ EPUBToolkit Frameworks/ Foundation.framework Other Sources/ EPUBToolkit-Prefix.pch
Create a file and add it to project, to group FooSources
echo '#import "Foo.h"' > Foo.m thor xcs:mkgroup FooSources thor xcs:add Foo.m FooSources
- Only first-level groups are supported
- No targets support
Ideas are welcome. Open issue or drop me a line at email@example.com
Pull requests are even more welcome.