Register as Login Item with Cocoa?

后端 未结 7 977
花落未央
花落未央 2020-11-27 03:13

Google gave me: http://developer.apple.com/samplecode/LoginItemsAE/index.html

And I figured there must be a better way than using AppleScript Events.

So I do

7条回答
  •  失恋的感觉
    2020-11-27 04:02

    SMLoginItemSetEnabled is another modern option, see Modern Login Items article by Cory Bohon where he explains that you have to create a helper application whose sole purpose is to launch the main application. There's also a full step by step explanation in SMLoginItemSetEnabled - Start at Login with App Sandboxed on Stack Overflow.

提交回复
热议问题