Here's an article on several approaches to code coverage in an application:
http://seriot.ch/blog.php?article=20080728
It is focused on Mac applications, but it is mainly used for iPhone (DTrace you can use only in the simulator)
As the article notes, the problem in objective-C is more complicated than in other languages, since it is so easy to get a method that executeSelector is called that static analysis will report as dead code, even if it is called (yes, you can also do something similar in Javabut, this is done much less often).
The gcc warning flag is probably the best idea, as well as a thorough study of what, in his opinion, are unclaimed methods. In fact, running any possible code path in the application is actually quite difficult, but if you have a smaller set of possible functions to delete, at least you can make a choice faster, so you don't have to check every path ...
EDIT: I should probably clarify that code coverage is a method that you can use to find the "dead" code that came after
EDIT2: The link is dead! I cannot find the cached version, and I cannot remember it well enough to generalize more about what it contained.
source share