Difference between revisions of "Daemons"

From iPhone Development Wiki
Jump to: navigation, search
(First summon)
 
(Example)
Line 1: Line 1:
 
Daemons are programs that run as a background process. These programs may or may not have a long life cycle and exist in a paradigm different to tweaks. They do not require to be injected onto other processes, that means that they exist by themselves.
 
Daemons are programs that run as a background process. These programs may or may not have a long life cycle and exist in a paradigm different to tweaks. They do not require to be injected onto other processes, that means that they exist by themselves.
 +
 +
Several tweaks and programs use them such as f.lux, gremlin, rocketbootstrap, SafariDownloadEnabler, ssh.
  
 
== How to make <!-- summon --> a daemon ==
 
== How to make <!-- summon --> a daemon ==
Line 16: Line 18:
  
 
''To do: table specifying the keys and values.''
 
''To do: table specifying the keys and values.''
 +
 +
== Examples ==
 +
 +
* [https://github.com/uroboro/iOS-daemon iOS daemon]
  
 
== References ==
 
== References ==

Revision as of 23:29, 4 October 2014

Daemons are programs that run as a background process. These programs may or may not have a long life cycle and exist in a paradigm different to tweaks. They do not require to be injected onto other processes, that means that they exist by themselves.

Several tweaks and programs use them such as f.lux, gremlin, rocketbootstrap, SafariDownloadEnabler, ssh.

How to make a daemon

There's two steps: making a program and making a plist for it.

The program

While idle, the program should waste the least possible resources. Remember that it is working along with many other already existing processes.

Given that memory isn't shared across processes, one cannot call functions or get objects freely between processes. To solve this, one must use some form of IPC (notifications, XPC, sockets) to communicate with the daemon.

The plist

Place your plist, following the reverse DNS notation (com.your.daemon), in layout/Library/LaunchDaemons.

To do: table specifying the keys and values.

Examples

References