Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

show ANSI color in Xcode4 debug console

Tags:

ios

xcode4

Is there any way to do this? I wan't to distinguish my Logs by different colors.

like image 973
CarmeloS Avatar asked Nov 03 '22 18:11

CarmeloS


1 Answers

To enable ANSI colors in Xcode console install clone https://github.com/robbiehanson/XcodeColors and build. The build process will install the Xcode plugin in the proper directory.

To unsign Xcode clone https://github.com/steakknife/unsign, run make, put the unsign command in the path. Then run the following:

cd /Applications/Xcode.app/Contents/MacOS
sudo unsign Xcode
sudo mv Xcode Xcode.signed
sudo ln -sf Xcode.unsigned Xcode

Note that this is reversible. Just change the symbolic link. Now you need to update the plugin UUID to match the current Xcode version:

XCODEUUID=`defaults read /Applications/Xcode.app/Contents/Info DVTPlugInCompatibilityUUID`

for f in ~/Library/Application\ Support/Developer/Shared/Xcode/Plug-ins/*; do defaults write "$f/Contents/Info" DVTPlugInCompatibilityUUIDs -array-add $XCODEUUID; done

Now you can use ANSI colors in your Xcode console. It looks like this:

like image 190
Jano Avatar answered Nov 15 '22 07:11

Jano