Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you extract header files from a private framework on OS X?

Tags:

macos

I've tried class-dump and class-dump-x, but neither works on CoreSymbolication.framework on Snow Leopard (OS X 10.6.2)

/System/Library/PrivateFrameworks/CoreSymbolication.framework

Are there are any other ways to retrieve the headers for this framework?

like image 736
JanePhanie Avatar asked Feb 02 '10 19:02

JanePhanie


People also ask

What is private frameworks Mac?

Private frameworks are frameworks which you are not allowed to use. They are not expected to be used outside of Apple, hence "Private". They are often lower-level libraries which may "break" the system if not used correctly.

Can I delete frameworks Mac?

Can I delete it safely? No, and you can't delete anything else in /System/ safely either.

Where are header files stored in Mac?

sdk . From there, usr/include holds common public headers such as the standard C headers, and various Apple headers are in frameworks under System . In /Applications/Xcode. app/Contents/Developer/Platforms , you will likely find folders for other platforms, such as iPhoneOS.

What are .H files on Mac?

H header files are typically used to store C function declarations, as well as macro definitions, which can be used by multiple source files. Header files can be inserted into a . C source code file using the #include directive.


1 Answers

CoreSymbolication is not written in Objective-C but in C++. That’s why class-dump does not work. You can use

nm /System/Library/PrivateFrameworks/CoreSymbolication.framework/CoreSymbolication | c++filt

to look at the symbols defined in CoreSymbolication. They are a little difficult to read because of heavy template usage.

Alas, for C++, it’s not possible to generate full header information out of the executable.

like image 94
Nikolai Ruhe Avatar answered Sep 19 '22 17:09

Nikolai Ruhe