Shazron's Cordova (aka PhoneGap) Blog

at Adobe Systems Inc.

Archive for December 2010

Xcode shell build phase, reporting of errors

with 6 comments

Found this useful information, regarding Xcode error reporting for shell build phases. For example, if we were to include JSLint in PhoneGap iPhone, we could format the errors this way below so code where the errors occur are easily editable:

In shell build phases you can write to stderr using the following format:
<filename>:<linenumber>: error | warn | note : <message>\n
It’s the same format gcc uses to show errors. The filename:linenumber part can be omitted. Depending on the mode (error, warn, note), Xcode will show your message with a red or yellow badge.
If you include an absolute file path and a line number (if the error occurred in a file), double clicking the error in the build log lets Xcode open the file and jumps to the line, even if it is not part of the project. Very handy.

Written by shazron

December 4, 2010 at 2:00 am

Posted in xcode

Follow

Get every new post delivered to your Inbox.

Join 1,489 other followers

%d bloggers like this: