我正在尝试编写一个小型 Cocoa 应用程序来帮助我管理我的时间,我希望它在启动时检查是否已经有一个启动条目,如果没有,则添加一个条目。
编写启动文件的正确文件夹是什么,和/或是否有特殊的可可方法来检索正确的文件夹是什么(即以与检索用户文档文件夹相同的方式)或者您只是假设以下其中一项困难编码位置?
手册页列出了我可能想要使用的以下可能的 URL ~/Library/LaunchAgents?
~/Library/LaunchAgents Per-user agents provided by the user.
/Library/LaunchAgents Per-user agents provided by the administrator.
/Library/LaunchDaemons System-wide daemons provided by the administrator.
/System/Library/LaunchAgents Per-user agents provided by Mac OS X.
/System/Library/LaunchDaemons System-wide daemons provided by Mac OS X.