开发者

How can I write an autostarting dock app for the Mac?

开发者 https://www.devze.com 2023-02-03 15:56 出处:网络
I have an application I\'d like to build that starts when you start the mac and will appear in the dock.

I have an application I'd like to build that starts when you start the mac and will appear in the dock.

I have some experience with Objective-C and iPhone dev but none with Mac dev, I'm also a PC user normally so I'm not au fait with the norms of Mac usage. Any guidance h开发者_StackOverflow社区ere is appreciated.

How do you get an application to autostart?

*edit Can you run an app in the status bar? (with the clock etc) or do apps only run in the dock?


To write a program in the Status Bar check out this great tutorial.

To get an application to auto start on login, look for information on launch daemon or just make your application installer to place an entry on /Library/StartupItems.

About the dock: usually, user controls what's on his/her dock. When your UI application is running, it will usually be in the dock. If you want the icon to stick there permanently, you will need the user dragging the icon from the Finder to the dock, or, right-click on the dock icon while is running in select Options->Keep In Dock menu option.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号