To find APIs in a library:
nm -g /System/Library/Frameworks/AppKit.framework/AppKitTo generate headers of Objective-C classes in a library:
class-dump -H -o /AppKit_Headers /System/Library/Frameworks/AppKit.framework/AppKitTo view the disassembly of a function:
gdb /Applications/Calculator.app/Contents/MacOS/Calculator
break -[NSApplication run]
run
disas
To generate disassembly for an entire library:
otool -tV /System/Library/Frameworks/AppKit.framework/AppKitI've recently also started using otx. This works very similarly to otool but in addition it will annotate the assembly. The best part is that it will resolve Objective-C calls making it much easier to tell what a function is doing. Here's a sample output of otool (top) vs otx (bottom):