Pages

Tuesday 12 June 2012

Show TODO's As Warnings In Xcode 4


Instructions:

#1: click here:



#2:click here:




#3:click here:




#4:Click here





#5:Now add this script


KEYWORDS="TODO:|\?\?\?:|\!\!\!:"
 find "${SRCROOT}" \( -name "*.h" -or -name "*.m" \) -print0 | xargs -0 egrep --with-filename --line-number --only-matching "($KEYWORDS).*\$" | perl -p -e "s/($KEYWORDS)/ warning: \$1/"



And then build to see all the TODO's as warnings..






1 comment:

  1. Thanks for this tip. I just want to add, that while this is for Xcode 4 originally, it still works in Xcode 5.1.

    ReplyDelete