views:

90

answers:

2

I don't remember where I heard about it, (I think I was searching up on how selectors worked and it ended up not being exactly the same as a callback function) and I can't confirm it. But more importantly than that, is there a way I could get a list of the function names from another application?

+4  A: 

See class-dump.

bbum
+1  A: 

You can sometimes see a list of the method names in an application. Find the .ipa file for the app (possibly in the Music->iTunes->Mobile Applications directory on a Mac). Make a copy of one of the ipa files and change it from .ipa to .zip. Unzip the file and in the Payload folder, there's a file with the same name as the app. Right click on it and "Show Package Contents". In there, you'll find another file with the same name as the app (with no extension). This is the executable file for the app. If you open it in a text editor like BBEdit, you'll sometimes be able to see some method names, as well as a list of the frameworks the app is built against. You can find the path name where things were kept too, often with the developer's name.

For example, looking into the Japanese dicitonary Daijirin, I can see these methods:
-[HMWebSupport openMONOKAKIDOSupportWithSafariForView:style:]
-[HistoryViewController viewWillAppear:]

I can also see that one of the developers was called Norihito, and he was using SVN: /Users/norihito/Developer/SVN/Mobile/DAIJIRIN/Other

Other applications (like Weightbot) don't show as much information. I don't know the reason it shows up some times and doesn't other times.

nevan
Just run [`strings`](http://developer.apple.com/mac/library/documentation/Darwin/Reference/ManPages/man1/strings.1.html) on the file.
KennyTM
`strings` didn't seem to find the things I found in BBEdit. I've never used it before though so I might have missed an option.
nevan