Swift: Launch on startup / SMLoginItemSetEnabled

Previous Topic Next Topic
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Swift: Launch on startup / SMLoginItemSetEnabled

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. 

any help would be great!

You received this message because you are subscribed to the Google Groups "Swift Language" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/swift-language/e111b212-606e-4e57-a1db-3551f26270e9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.