Skip to content

Instantly share code, notes, and snippets.

@mattwymore
Created September 17, 2013 23:29
Show Gist options
  • Save mattwymore/6602176 to your computer and use it in GitHub Desktop.
Save mattwymore/6602176 to your computer and use it in GitHub Desktop.
This is a handy one-liner to get objective-C method names from Mach-O binaries. I used it because the Xcode validator flagged usage of a private API and I needed to find which 3rd party library was using the private method. source: http://stackoverflow.com/a/4534619
otool -s __TEXT __objc_methname "$1" |expand -8 | cut -c17- | sed -n '3,$p' | perl -n -e 'print join("\n",split(/\x00/,scalar reverse (reverse unpack("(a4)*",pack("(H8)*",split(/\s/,$_))))))'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment