If we want to run a dockless application at login and we are using Mac OS X 10.5 or later, we can add login items using a shared file list with LaunchServices/LSSharedFileList.h API.
[…]
Why not directly set the application with SMLoginItemSetEnabled? Why do we need to use a helper application?
Because the SMLoginItemSetEnabled function works only with executables stored in the Contents/Library/LoginItems directory of the bundle.
[…]