libimobiledevice  1.3.0
API Documentation - Return to Homepage

◆ lockdownd_cu_pairing_create()

LIBIMOBILEDEVICE_API lockdownd_error_t lockdownd_cu_pairing_create ( lockdownd_client_t  client,
lockdownd_cu_pairing_cb_t  pairing_callback,
void *  cb_user_data,
plist_t  host_info,
plist_t  acl 
)

Creates a CU pairing session for the current lockdown client.

This is required to allow lockdownd_cu_send_request_and_get_reply(), lockdownd_get_value_cu() and lockdonwd_pair_cu() requests, and eventually allows to perform an actual wireless pairing.

Through the callback function, the PIN displayed on the device has to be supplied during the process. Currently, only AppleTV devices have this capability.

Parameters
clientThe lockdown client to perform the CU pairing for
pairing_callbackCallback function that is used to supply the PIN for the pairing process, but also to receive device information or pairing error messages.
cb_user_dataUser data that will be passed as additional argument to the callback function.
host_info(Optional) A dictionary containing host information to send to the device when finalizing the CU pairing. The supplied values will override the default values gathered for the current host.
acl(Optional) A dictionary containing ACL information. Currently only com.apple.ScreenCapture:true and com.apple.developer:true are known valid ACL values, which are used as default when NULL is passed.
Returns
LOCKDOWN_E_SUCCESS on success, LOCKDOWN_E_INVALID_ARG if one of the parameters is invalid, LOCKDOWN_E_PAIRING_FAILED if the pairing failed, or a LOCKDOWN_E_* error code otherwise.