xpc_connection_set_peer_team_identity_requirement(_:_:)
Sets a requirement that the executable for the peer process has a valid code signature and is signed by the same team identifier as the calling process.
Declaration
func xpc_connection_set_peer_team_identity_requirement(_ connection: xpc_connection_t, _ signing_identifier: UnsafePointer<CChar>?) -> Int32Parameters
- connection:
The XPC connection.
- signing_identifier:
The code-signing identifier for the peer process’s executable. This value is typically a Bundle ID for apps and extensions. Pass
NULLto indicate that any binary signed by the same team as this process is acceptable.
Return Value
On success, 0. Otherwise, a value from Errors.
Discussion
When you set this requirement on a connection, the operating system checks that peer process satisfies the requirement every time it sends a message to your process.
If the peer process initiated the connection and its executable isn’t signed by the same team, or doesn’t have the correct signing identifier, then you don’t receive a message and the operating system doesn’t call your event handler.
If your process sent a message to its peer expecting a reply, and its executable isn’t signed by the same team, or doesn’t have the correct signing identifier, then you don’t receive a reply and the operating system delivers XPC_ERROR_PEER_CODE_SIGNING_REQUIREMENT instead.
See Also
Remote peer information
xpc_connection_get_name(_:)xpc_connection_get_euid(_:)xpc_connection_get_egid(_:)xpc_connection_get_pid(_:)xpc_connection_get_asid(_:)xpc_connection_set_peer_entitlement_exists_requirement(_:_:)xpc_connection_set_peer_entitlement_matches_value_requirement(_:_:_:)xpc_connection_set_peer_lightweight_code_requirement(_:_:)xpc_connection_set_peer_platform_identity_requirement(_:_:)xpc_connection_set_peer_code_signing_requirement(_:_:)