How to hook dynamic casting runtime functions

I have a demo project.I use a swift class to forward method call to a oc class. I disabled bridge-header, everything works well except that when I convert the oc instance to swift type ,it crashed. So I wonder if
I can hook dynamic casting runtime functions such as : _swift_dynamicCastClass, _swift_dynamicCastClassUnconditional.
Maybe fishhook can do the thing, I wonder if there is official Swift API to do this kind of work.

I’m not sure if hooking mentioned functions is what you need. I suspect protocols may be the answer to your problem. Could you provide a code example to illustrate what you are trying to accomplish?

Terms of Service

Privacy Policy

Cookie Policy