创建iPhone模拟器一个libsubstrate(Creating a libsubstrate

2019-10-19 08:28发布

我工作在JB iPhone MobileSubstrate有插件。 我创造了我的iPhone Xcode的dylib它建立罚款设备,但是当我尝试建立它模拟器,它给了我一个错误“从_MSHOOKMESSAGE参考:等等等等”。 我已经把所有的头在正确的位置。 我从设备libsubstrate但是这是我想到的问题。 从设备的libsubstrate不是模拟器要去工作。 所以我的问题是如何创建一个模拟器libsubstrate?

Answer 1:

如果你只需要使用MSHookMessageEx (它取代MSHookMessage ),你可以

#define MSHookMessageEx(class, selector, replacement, result) \
 (*(result) = method_setImplementation(class_getInstanceMethod((class), (selector)), (replacement)))

当然, MSHookMessageEx移动基板比这更复杂,但是出于测试目的,这通常是不够的。



Answer 2:

http://www.ipodtouchfans.com/forums/showthread.php?t=103558可能是这可以帮助你。 祝好运。



文章来源: Creating a libsubstrate for iPhone Simulator