ios - 如何在不重新启动 ios 设备的情况下加载 launchDaemon.plist?
<p><p>我写了一个launchDaemon.plist,放到<code>/System/Library/LaunchDaemon/</code>中。</p>
<p>如何在不重启 iOS 设备的情况下加载它?</p></p>
<br><hr><h1><strong>Best Answer-推荐答案</ strong></h1><br>
<p><p>如果你通过 <code>ssh</code> 登录你的 iOS 设备,你可以从命令行使用它:</p>
<pre class="lang-sh prettyprint-override"><code>launchctl load /System/Library/LaunchDaemons/launchDaemon.plist
</code></pre>
<p>当然,要停止守护进程</p>
<pre class="lang-sh prettyprint-override"><code>launchctl unload /System/Library/LaunchDaemons/launchDaemon.plist
</code></pre>
<p><strong>注意:</strong>如果您打算将其作为一个<em>产品</em>发布,而不仅仅是供您自己使用,我建议您遵循正常的命名约定,并为您的 plist 文件命名像 <code>com.mycompany.MyCrazyDaemon.plist</code>.</p>
<p>引用:<a href="http://developer.apple.com/library/mac/#documentation/Darwin/Reference/ManPages/man1/launchctl.1.html" rel="noreferrer noopener nofollow">Apple OS X docs on launchctl</a> .</p></p>
<p style="font-size: 20px;">关于ios - 如何在不重新启动 ios 设备的情况下加载 launchDaemon.plist?,我们在Stack Overflow上找到一个类似的问题:
<a href="https://stackoverflow.com/questions/15520437/" rel="noreferrer noopener nofollow" style="color: red;">
https://stackoverflow.com/questions/15520437/
</a>
</p>
页:
[1]