I have a static library objective c with some C functions that I need to modify the behavior of based on the callers. I looked at https://opensource.apple.com/source/dyld/dyld-210.2.3/include/mach-o/dyld-interposing.h and saw that it could be used to essentially "swizzle" C functions.
My question is - will dyld_interpose also interpose the C function in all libraries / frameworks that contain my interposing code?
eg.
Library1 - had C Function
void foo(int bar) {
...
}
Library2 - Has interposing code. Depends on Library1
void my_foo(int bar) {
...
}
DYLD_INTERPOSE(my_foo, foo);
Will Library3 that depends on both Library1 and Library2 be interposed as well? What if it is attached to an application? I've got some success getting it working on an framework.