Tag Archives: xcode

Uninstall XCode / Xcode 4 Preview

There is no application in Mac OSX to uninstall Programs. The only thing you can do is drag an application to the Trash Can.
However, it is quite simple to uninstall applications on MAC OS; you just move the application to the trash bin. Doing this, however, does not completely take care of uninstalling programs on Mac.

To understand why, you need to know that programs on Mac computers are of two types; the bundled programs, which can be uninstalled just by moving them to the Trash bin, and the non-bundled programs, which can be uninstalled using the same method, but additional manual work is required to clean up after them. Many programs leave behind settings and other small files that continue to take up space on your hard drive. These must be cleared out as well to ensure that you efficiently uninstall programs on Mac.

Here are some third-party uninstallers for your Mac, and their features:

Appcleaner

Appcleaner
Finds support files and preferences left behind by programs, and removes them from your hard disk.
Select the program that you want to uninstall and drag and drop it into AppCleaner

Apptrap

Apptrap
Takes care of supporting files, preferences and system files.
When you delete an application, an AppTrap window pops up and asks you if you want to remove the trashed program’s associated files.

Now, what about XCode?

The thing is that XCode is not listed as application, application bunldes and widgets.
To succefully remove XCode you have to run this command

sudo /Library/uninstall-devtools –mode=all

is the directory where the tools are installed. For typical installations the full path is /Developer/Library/uninstall-devtools
Cant find it

find / -type f -name “uninstall-devtools”

Easy enough, just make sure this is what you really intend to do as once it’s gone, it’s gone.

Getting NSDate from NSString

Very useful, yet short and simple, code snippet on how to rip the NSDate from NSString using NSDateFormatter:

NSString *dateString = @"2010-01-19";
NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
// this is imporant - we set our input date format to match our input string
// if format doesn't match you'll get nil from your string, so be careful
[dateFormatter setDateFormat:@"yyyy-MM-dd"];
NSDate *dateFromString = [[NSDate alloc] init];
// ta-daaa!
dateFromString = [dateFormatter dateFromString:dateString];

If you need more info about different date formats see Unicode Date Format Patterns. Of course if you usually work with standard dates you can use setDateStyle instead of setDateFormat.

Xcode Color Themes


This is a small collection of my personal preference of color themes for xcode programming environment. For those who are looking for a dark theme. You can chose from one of the following color themes. I’m currently using teliaz theme, it has been tested and works very smoothly.

To get

teliaz theme

run the following code in Terminal:

mkdir -p ~/Library/Application\ Support/Xcode/Color\ Themes; cd ~/Library/Application\ Support/Xcode/Color\ Themes; curl http://teliaz.com/files/apple/TeliazTheme.xccolortheme &> TeliazTheme.xccolortheme

To get

Ego theme

run the following code in Terminal:

mkdir -p ~/Library/Application\ Support/Xcode/Color\ Themes; cd ~/Library/Application\ Support/Xcode/Color\ Themes; curl http://teliaz.com/files/apple/XCodeColorTheme.xccolortheme &> EgoTheme.xccolortheme

“EGO” uses the font “DejaVu Sans Mono” at 12pt. Some of you may know it as “Panic Sans” from Panic’s Coda (which is a repackaged version of it). You can grab the font over at dejavu-fonts.org. If you already have Code installed, feel free to swap in Panic Sans in place of DejaVu Sans Mono.

To get

Humane Theme

run the following code in Terminal:

mkdir -p ~/Library/Application\ Support/Xcode/Color\ Themes; cd ~/Library/Application\ Support/Xcode/Color\ Themes; curl http://teliaz.com/files/apple/Humane.xccolortheme &> Humane.xccolortheme

Now just restart Xcode, go to Preferences > Fonts & Colors, and select “one of these themes” from the color theme drop down. Hope you like it!! Happy coding…

NIBs or code? Why not both? Here’s nib2objc.


(Somehow this project seems to me so simple, that I’m sure someone has done this before. Anyway). This is my feeble attempt to bring an answer to the eternal dichotomy between those arguing about the relative benefits of creating user interfaces via Interface Builder or via pure Objective-C code: let me introduce nib2objc.
Continue reading NIBs or code? Why not both? Here’s nib2objc.