When you use method_setImplementation(Method, IMP) on a method retrieved from a metaclass (lit.: a class method), and that metaclass is fully resolved, its dtable will not be updated to point to the new IMP.
This is due to a bug in objc_updateDtableForClassContainingMethod. It iterates over every class known to the runtime and updates the dtable of the first class containing that selector (!!).
When you use
method_setImplementation(Method, IMP)
on a method retrieved from a metaclass (lit.: a class method), and that metaclass is fully resolved, its dtable will not be updated to point to the new IMP.This is due to a bug in objc_updateDtableForClassContainingMethod. It iterates over every class known to the runtime and updates the dtable of the first class containing that selector (!!).