为 iPhone 编写 LaunchDaemon
[越狱] 我用谷歌搜索过,但找不到任何有关如何编写 LaunchDaemon 的指南。这是针对 iPhone 的,所以它将采用 Objective-C 语言。我很了解 Objective-C,我只需要一些指导来帮助我入门。
我知道如何编写守护进程 .plist,我的意思是 - 如何编写 .plist 运行的二进制文件,例如: usr/bin/myBinary
它会和平常一样吗? int main (int argc, const char* argv[]) 之类的东西?
[JAILBROKE]
I've googled, but i can't find any guides on how to write a LaunchDaemon. This is for the iPhone, so it'll be in Objective-C. I know Objective-C well, i just need some kind of guide to get me started.
I know how to write the daemon .plist, what i mean is- how to write the binary that the .plist runs, eg: usr/bin/myBinary
Would it be the same as usual?
int main (int argc, const char* argv[])
sort of thing?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
除非你越狱你的 iPhone,否则你不能。
一旦越狱,plist 中指定的任何可执行文件都将被运行。你可以使用任何方法来编写它。阅读 launchd.plist 文档< /a>.除了那里写的内容之外,系统和守护进程之间没有任何契约。随心所欲地写吧。即使是脚本(不是组合的二进制文件)也应该可以工作。
You can't unless you jailbreak your iPhone.
Once jailbroken, any executable file specified in the plist would be run. You can use whatever methods to write it. Read launchd.plist documentation. There's no contract between the system and the daemon in addition to what's written there. Write it as you wish. Even a script (not a combined binary) should work.