cabin33 / xcs

Xcode command-line interface

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

xcs (Xcode script)

Update

xcs2 (the next generation of this tool) is available here

Intro

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.

Installation

You'll need two gems: thor and rb-appscript. And then run

thor install https://github.com/gonzoua/xcs/raw/master/xcs.thor

Tasks

Get full list of tasks using command

thor xcs:help
  • 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

Sample usage

Just cd to your project directory and run

thor xcs:list

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

Limitations

  • Only first-level groups are supported
  • No targets support

Ideas

Ideas are welcome. Open issue or drop me a line at gonzo@bluezbox.com
Pull requests are even more welcome.

Contributors

Oleksandr Tymoshenko

License

See LICENSE

About

Xcode command-line interface

License:BSD 2-Clause "Simplified" License