I made a simple OSX-app and want to add a function which allows the user to enable that the app starts on launch or login. I know that i have to use SMLoginItemSetEnabled combined with a helper.app, read the reference (https://developer.apple.com/library/mac/documentation/MacOSX/Conceptual/BPSystemStartup/Chapters/CreatingLoginItems.html) and some tutorials but i just don't get it :(
i think my biggest problem is that there is no example for this while using swift. i don't know objective-c and tried a bit with bridging headers, but without any solution. for now, i'm able to start the helper.app (thanks to this tutorial http://www.delitestudio.com/2011/10/25/start-dockless-apps-at-login-with-app-sandbox-enabled/) but don't know how to change the Login state.