views:

51

answers:

3

I was wondering if there were a way to extract information from an objective-c app, static or dynamic library and/or framework?

Information such as an array of class names without instantiating or running the target.

I've checked google and the apple developer documentation and haven't found anything.

Frank

+1  A: 

If you want to extract classes from an application/dynamic library, there is a handy tool called ClassDump.

It can even generate the header files in order to get an overview of the classes, protocols, etc.

If you want to do it at runtime, then take a look at the source code to learn how to load and parse the different mach-o segments.

Laurent Etiemble
Thanks. I will do that. I will also send out a prayer to the god of frameworks to encourage authors to put the core of this functionality into something runtime reusable!!!
Frank C.
+1  A: 

F-script appears to be able to do what you want, but I'm no expert. Check out www.fscript.org.

John Velman
Thanks John. This may be more appealing than the lower level class dump, at least F-script has a framework to embed in the application although I haven't researched enough to conclude what I need is available.
Frank C.
+1  A: 

This is an excellent starting point for reverse-engineering Cocoa apps:

http://culater.net/wiki/moin.cgi/CocoaReverseEngineering

It mentions F-Script, class-dump, and a few others.

Dave Gallagher
Thanks Dave. I'm almost at the point of implementing what I need so this is a great reference/overview to keep by my side when developing.
Frank C.