2

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:

Any suggestions to how I can implement this?

Community
  • 1
  • 1
Jarle Hansen
  • 1,993
  • 2
  • 16
  • 29
  • What do you mean by 'application startup'? You can put more code into `main()` before you call `NSApplicationMain()`, for example. – Carl Norum Feb 23 '13 at 17:53
  • Sorry about not specifying this, but I am talking about other applications that I do not control. – Jarle Hansen Feb 23 '13 at 17:54
  • I see - your question says "my own objective-c program", which was a little confusing! What kind of "functionality" are you trying to add? – Carl Norum Feb 23 '13 at 17:56
  • a password box, so they must enter a password before they are allowed to start the app. My application will be responsible for the administration and all the stuff surrounding the permission to start the other applications. – Jarle Hansen Feb 23 '13 at 17:56
  • Isn't that something more easily handled by filesystem permissions/ACLs? – Carl Norum Feb 23 '13 at 18:00
  • There will be custom handling and administration of the access, so at certain times they are allowed to start the applications. This is highly dependent on events, what has the user done previously and so on. Not sure how and if I can do this with file permissions. – Jarle Hansen Feb 23 '13 at 18:03
  • The "old" SIMBL won't work anymore (and because of sandboxing, I don't think DYLD_INSERT_LIBRARIES and mach_override will either), try the new version (https://github.com/norio-nomura/EasySIMBL/). Although keep in mind that SIMBL is a bit of a hack. – robertklep Feb 23 '13 at 21:34
  • Parental controls / managed accounts might be able to achieve part of what you're trying to do. – puzzle Feb 23 '13 at 22:44
  • Is it possible to configure/active parental controls in code? – Jarle Hansen Feb 24 '13 at 11:11

0 Answers0