Reputation: 51
[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?
Upvotes: 2
Views: 812
Reputation: 34185
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.
Upvotes: 2