Last time we talked about some great programming books, and how to start developing. Today we will dive into some of the great tools available to Cocoa Developers.
One of the greatest blessings that Apple has given us developers is documentation. And not just documentation, but in-depth, clear, and understandable documentation. There are also lots of sample codes and coding guides. And when you install the SDK you automatically get all of this free of charge. You can even access it all right from Xcode; just go to Help>Documentation. You will then be presented with the documentation window. Based on whether or not you have the iPhone SDK installed, you will see Mac OS X and iPhone sections. You can search through certain sets (like OS X 10.5, or iPhone 2.2) or search them all. If you have the iPhone SDK installed, though, you will want to search by sets so you don’t accidentally try to put Cocoa Touch in Cocoa. If you click on a set in the sidebar, you can view its main page, which can help you find what you need if you don’t know what its called. The documentation is going to be your best friend as a Cocoa developer. You are never expected to remember those long delegate methods like
tableView:targetIndexPathForMoveFromRowAtIndexPath:toProposedIndexPath: or even short methods like
Another great tool that can be used for remembering methods or blocks of code is Code Collector Pro (which we have previously reviewed). Code Collector Pro allows you to create code snippets and then sort them by tags, description, language, etc. It is very useful if there are large chunks of code that you use very often. You could use something like TextExpander, but Code Collector Pro is built for coders. It even has syntax highlighting.
One of my personal favorite tools is Class-Dump. Class-Dump allows you to feed it a binary file, and it will give you all the header files associated with that binary. This is great for finding private header files in things like
UIKit, or if you just want to see the header files of your favorite application. The basic syntax for it is
class-dump -H /Applications/iTunes.app/Contents/MacOS/iTunes. Before you run it you may want to call
mkdir ~/Dekstop/headers and then
cd ~/Dekstop/headers. This is just to make sure you don’t end up with 100+ header files in your home folder.
The final tool (or tools) I will leave you with are websites. These are my favorite websites for finding tutorials and answers to my questions: