OGeek|极客世界-中国程序员成长平台

标题: ios - 如何在不重新启动 ios 设备的情况下加载 launchDaemon.plist? [打印本页]

作者: 菜鸟教程小白    时间: 2022-12-12 09:47
标题: ios - 如何在不重新启动 ios 设备的情况下加载 launchDaemon.plist?

我写了一个launchDaemon.plist,放到/System/Library/LaunchDaemon/中。

如何在不重启 iOS 设备的情况下加载它?



Best Answer-推荐答案


如果你通过 ssh 登录你的 iOS 设备,你可以从命令行使用它:

launchctl load /System/Library/LaunchDaemons/launchDaemon.plist

当然,要停止守护进程

launchctl unload /System/Library/LaunchDaemons/launchDaemon.plist

注意:如果您打算将其作为一个产品发布,而不仅仅是供您自己使用,我建议您遵循正常的命名约定,并为您的 plist 文件命名像 com.mycompany.MyCrazyDaemon.plist.

引用:Apple OS X docs on launchctl .

关于ios - 如何在不重新启动 ios 设备的情况下加载 launchDaemon.plist?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15520437/






欢迎光临 OGeek|极客世界-中国程序员成长平台 (http://ogeek.cn/) Powered by Discuz! X3.4