Cocoa Launch agent registering itself after installation.
- by Unicorn
I have created Cocoa app which is type of launch agent. To distribute this I have created package as well which installs the app and copies the launchagnet plist file in /Libraries/LaunchAgents.
Now the problem is after installation i want this app to be running in user context immediately without logoff/restart. If I register this with "launchctl" from installer, using post install script, it run in root context, as installer is running in root context.
Any suggestion how the agent registers itself to launchctl and runs in user context.