I would like to add a bit of functionality before applications are started on Mac OS X, applications that I do not control and do not have access to the source code. Is there any way I can intercept application startup in my own objective-c program?
I have so far looked at:
- DYLD_INSERT_LIBRARIES - seems promising, but does not work for all applications? (DYLD_INSERT_LIBRARIES doesn't work for app signed with entitlements on Mountain Lion)
- mach_override - Not sure about this one, seems more complex than DYLD_INSERT_LIBRARIES and I am having a hard time finding any good examples and documentation for it.
- SIMBL (http://www.culater.net/software/SIMBL/SIMBL.php) - only works for Cocoa?
Any suggestions to how I can implement this?