How can I use class-dump to get the headers of IOHIDLib?

左心房为你撑大大i 提交于 2020-02-03 09:48:27

问题


It can dump the runtime headers of private frameworks of iOS by class-dump tool. but I'm looking for the headers of the IOHIDEvent which has been moved to any where that I can not find after iOS 6. But, in the iOS 6 SDK there is lib looks like it:

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk/System/Library/Extensions/IOHIDFamily.kext/PlugIns/IOHIDLib.plugin

How can I dump the headers of the IOHIDLib?


回答1:


class-dump is a tool that lets you reverse engineer Objective-C binaries. But, it looks to me like IOHIDLib is a C/C++ library, so class-dump won't help you there:

$ class-dump -H IOHIDLib 
2013-06-14 02:55:39.104 class-dump[4676:707] Unknown load command: 0x0000002a
2013-06-14 02:55:39.106 class-dump[4676:707] Unknown load command: 0x0000002b
2013-06-14 02:55:39.109 class-dump[4676:707] Warning: This file does not contain any Objective-C runtime information.

Luckily, IOHIDEvent appears to be part of the open-source part of iOS. You can find headers (and .cpp file) for it here.

I don't know what you're trying to do with it, but if it's some basic touch event handling, you might try using GSEvent. There's a good bit more documentation for that, especially if you search on stackoverflow.



来源:https://stackoverflow.com/questions/17104290/how-can-i-use-class-dump-to-get-the-headers-of-iohidlib

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!