bang590 / JSPatch

JSPatch bridge Objective-C and Javascript using the Objective-C runtime. You can call any Objective-C class and method in JavaScript by just including a small engine. JSPatch is generally used to hotfix iOS App.
MIT License
11.37k stars 2.24k forks source link

谁能帮忙解答一下,作者为什么不直接替换要修改方法的IMP的实现,而是通过拦截消息转发,这样做有什么好处 #784

Closed bhltyou closed 7 years ago

bhltyou commented 7 years ago

谁能帮忙解答一下,作者为什么不直接替换要修改方法的IMP的实现,而是通过拦截消息转发,这样做有什么好处

bang590 commented 7 years ago

https://github.com/bang590/JSPatch/wiki/JSPatch-%E5%AE%9E%E7%8E%B0%E5%8E%9F%E7%90%86%E8%AF%A6%E8%A7%A3