[英]Distributing Launch Agent and Application together for MAC OSX
I am trying to solve the following problem. 我正在尝试解决以下问题。
The application is aimed to provide customized backup for a phone connected through the USB. 该应用程序旨在为通过USB连接的电话提供自定义备份。 When the phone is connected to the system, the application should be launched.
当电话连接到系统时,应启动该应用程序。
I already wrote the components as follows. 我已经编写了如下组件。 1. A Daemon that detects when the specific USB is connected and then launches the application.
1.一个守护程序,用于检测何时连接了特定的USB,然后启动该应用程序。 2. The Application that performs the backup.
2.执行备份的应用程序。
I need to bind these two things together. 我需要将这两件事捆绑在一起。 I went through the documentation for Launch Agents.
我浏览了启动代理的文档。 But there are more about making the main backup application launch during login/logout or system startup/shutdown.
但是,还有更多有关在登录/注销或系统启动/关闭期间启动主备份应用程序的信息。
Can you please help me in solving this? 您能帮我解决这个问题吗?
I really appreciate your help. 非常感谢您的帮助。
Thanks, Kishore 谢谢,Kishore
Add a launchd plist for your Daemon application to the /Library/LaunchDaemons directory 将您的Daemon应用程序的启动plist添加到/ Library / LaunchDaemons目录中
For more details on doing this refer: http://developer.apple.com/library/mac/#documentation/MacOSX/Conceptual/BPSystemStartup/Chapters/CreatingLaunchdJobs.html 有关执行此操作的更多详细信息,请参阅: http : //developer.apple.com/library/mac/#documentation/MacOSX/Conceptual/BPSystemStartup/Chapters/CreatingLaunchdJobs.html
or Daemons section of http://developer.apple.com/library/mac/#technotes/tn2083/_index.html 或http://developer.apple.com/library/mac/#technotes/tn2083/_index.html的“守护程序”部分
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.