You can use the DYLD_INSERT_LIBRARIES environment variable , but this only works with the applications you are running, and not with the system. More details here .
You can override system functions with mach_override , but this requires root privileges or the procmod group. Mach_override was released in MacHack 2003. With a quick glance, it looks as simple as a single function call.
mach_override_ptr(&orginalFunction, &overrideFunction, NULL);
Note that redefining the system as a whole is not recommended for non-debugging applications.
A related question .
Jadar source share