XcodeCapp Help

What it XcodeCapp

XcodeCapp is an utility tool that helps you to greatly improve your Cappuccino development workflow. One of the main stunning thing about Cappuccino is the ability to use Apple's xCode IDE to create your interfaces for web application. But Cappuccino can't read XIB (ones produced by xCode) directly and you have to run the tool nib2cib manually at each change of your interface. Moreover you cannot link Outlets and Actions directly.
Well, now all of this is possible, thanks to XcodeCapp. This tool is a port of another one written in Objective-J but much more faster and much more integrated. XcodeCapp will silently listen the directory tree of your Cappuccino project using Mac OS X FSEvent API — no dirty polling — and will convert your XIB files into CIB (ones that can be read by Cappuccino) at each change. It will also listen for your Objective-J files, and will convert them into hidden .h files in order to allow you to use Outlets and Actions from xCode as soon as you edit your code.

Video

You can have a look on the video on this website to understand how it works: http://antoinemercadal.fr/xcodecappcocoa/

Quick start

xCodeCapp is very easy to use and require nearly no user interaction. First of all you need to launch it (which seems to be OK). It will display a menu bar icon at the top right of your screen. By clicking on the icon, you will see a menu:

¬

First, you need to choose your Cappuccino project. To do so, click on "Start Listening". A folder chooser will appear. Navigate to the root project folder.

¬

You can choose either the folder itself, of you can enter the folder and select nothing. xCodeCapp will start to import your project. It will create a hidden folder in the root project directory named ".xCodeSupport". This folder contains mirrored files built by xCodeCapp. You should never go and modify anything into this folder. You should also ignore it if your project is in a SCM (git, subversion, etc.)

Now, when you edit a Objective-J file and when you save, you will see a Growl notification indicating that the conversion is done. The same happens when you edit a XIB file, xCodeCapp will automatically use nib2cib to convert the XIB into a CIB.

Play with XIBs

xCodeCapp mirrors your .j files into .h files in the .xCodeSupport folder. This allows to use Interface Builder to really link your outlets and actions with your code. When you create a new outlet in your Cappuccino classes and after saving, and so, after conversion by xCodeCapp, you will be able to see the outlet in interface builder. But to able to that, you need to launch the xCode support project.
To do so, click on the xCodeCapp icon, and select "Open xCode".

¬

The xCode project will open. You can now play with interface builder.

Ignoring files and folder

xCodeCapp is able to ignore some files and/or folders. By default, it will ignore "Frameworks", ".git", ".svn", ".xCodeSupport" and "Build" directory. To add some path you can create a file in the root project directory (where is stored .xCodeSupport) named ".xcodecapp-ignore". The syntax is pretty straightforward:

Build*
Libraries/Cappuccino*
Libraries/StropheCappuccino*
Libraries/*/Build/*
Categories*
.xCodeSupport*
Modules/*

You can use wildcard token "*" to say "everything". For example, "Libraries/*/Build/*" will ignore all files in "Build" folders located anywhere in "Libraries".
You must put only one ignore directive per line.

Help

This help message will only open at first launch. To consult it later, select "Open Help" in the xCodeCapp menu. You can also post any question to the Cappuccino mailing list (objectivej@googlegroups.com) or join us in our IRC channel (irc://irc.freenode.org/#cappuccino).

Credits

xCodeCapp was originally made by Francisco Tolmasky.
The Cocoa port is made by Antoine Mercadal.
This tool was built for the needs of Archipel Project and it's obviously open source and released under GPL v3.