以 xcode4.3 ios sdk 5.1中的电话短信使用的库为例:
路径
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk/System/Library/Frameworks/CoreTelephony.framework
在桌面生成
cd /users/你的用户名/desktop class-dump -H /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk/System/Library/Frameworks/CoreTelephony.framework -o Headers
生成的文件:
bash-3.2# ls .DS_Store Headers Tools imgs other .localized Localizable.strings code lame 电话短信拦截 bash-3.2# pwd /users/rinjack/desktop bash-3.2# cd headers bash-3.2# ls CDStructures.h CTCarrier.h CTMessageAddress-Protocol.h CTMessageStatus.h CTTelephonyNetworkInfo.h CTCall.h CTEmailAddress.h CTMessageCenter.h CTMmsEncoder.h NSCopying-Protocol.h CTCallCenter.h CTMessage.h CTMessagePart.h CTPhoneNumber.h bash-3.2#
红色为在终端中输入的命令,CDStructures.h CTCarrier.h CTMessageAddress-Protocol.h CTMessageStatus.h CTTelephonyNetworkInfo.h
CTCall.h CTEmailAddress.h CTMessageCenter.h CTMmsEncoder.h NSCopying-Protocol.h
CTCallCenter.h CTMessage.h CTMessagePart.h CTPhoneNumber.h 为导出的头文件。