No edit summary |
(Formatting.) |
||
Line 1: | Line 1: | ||
nfcd is a daemon running under the ''mobile'' user. It handles the communications between | nfcd is a daemon running under the ''mobile'' user. It handles the communications between PassKit and the underlying hardware and libraries. | ||
The core objects in it are: | The core objects in it are: | ||
Line 12: | Line 12: | ||
NFDaemon - (void)XPCConnection:(id) didReceiveCommand:(id) | NFDaemon - (void)XPCConnection:(id) didReceiveCommand:(id) | ||
== Launchd plist == | |||
{ | |||
<source lang="javascript">{ | |||
EnablePressuredExit = 1; | EnablePressuredExit = 1; | ||
EnableTransactions = 1; | EnableTransactions = 1; | ||
Line 24: | Line 25: | ||
Program = "/usr/libexec/nfcd"; | Program = "/usr/libexec/nfcd"; | ||
UserName = mobile; | UserName = mobile; | ||
} | }</source> | ||
Where the XPC service is registered under the "com.apple.nfcd" name | |||
== Supported XPC Commands == | |||
{| class="wikitable" | |||
! ID !! Command | |||
|- | |||
| 1 || q_registerConnection:info: | |||
|- | |||
| 2 || q_unregisterConnection: | |||
|- | |||
| 3-64 || send command to SE controller | |||
|- | |||
| 65 || q_updateSecureElementPowerState | |||
|- | |||
| 66 || _seIsInRestrictedMode | |||
|- | |||
| 67 || restrictedModeChanged | |||
|- | |||
| 68-239 || callSEContoller | |||
|- | |||
| 240 || setDeviceString | |||
|- | |||
| 241 || q_getControllerInfo | |||
|- | |||
| 242 || q_getSecureElementInfo | |||
|- | |||
| 243 || q_getBoosterInfo | |||
|- | |||
| 244 || q_readBoosterRegister | |||
|- | |||
| 245 || q_sendBoosterCommand | |||
|- | |||
| 246 || q_triggerAssertion | |||
|- | |||
| >247 || throw error | |||
|} | |||
These are formatted into a JSON list i.e. | These are formatted into a JSON list i.e. | ||
{ | |||
command = 1; | <source lang="javascript">{ | ||
} | command = 1; | ||
}</source> |
Revision as of 04:18, 25 September 2015
nfcd is a daemon running under the mobile user. It handles the communications between PassKit and the underlying hardware and libraries.
The core objects in it are:
- NFDaemon
- NFFieldDetectController
- NFCoreTelephonyConnection
- NFPowerManager
- NFAbstractController
- NFCardEmulationController
- NFSecureElementController
NFDaemon - (void)XPCConnection:(id) didReceiveCommand:(id)
Launchd plist
{
EnablePressuredExit = 1;
EnableTransactions = 1;
ExitTimeOut = 45;
Label = "com.apple.nfcd";
MachServices = {
"com.apple.nfcd" = 1;
};
ProcessType = Interactive;
Program = "/usr/libexec/nfcd";
UserName = mobile;
}
Where the XPC service is registered under the "com.apple.nfcd" name
Supported XPC Commands
ID | Command |
---|---|
1 | q_registerConnection:info: |
2 | q_unregisterConnection: |
3-64 | send command to SE controller |
65 | q_updateSecureElementPowerState |
66 | _seIsInRestrictedMode |
67 | restrictedModeChanged |
68-239 | callSEContoller |
240 | setDeviceString |
241 | q_getControllerInfo |
242 | q_getSecureElementInfo |
243 | q_getBoosterInfo |
244 | q_readBoosterRegister |
245 | q_sendBoosterCommand |
246 | q_triggerAssertion |
>247 | throw error |
These are formatted into a JSON list i.e.
{
command = 1;
}