libimobiledevice  1.3.0
API Documentation - Return to Homepage

◆ preboard_create_stashbag()

preboard_error_t preboard_create_stashbag ( preboard_client_t  client,
plist_t  manifest,
preboard_status_cb_t  status_cb,
void *  user_data 
)

Tells the preboard service to create a stashbag.

This will make the device show a passcode entry so it can generate and store a token that is later used during restore.

Parameters
clientThe preboard client
manifestAn optional manifest
status_cbCallback function that will receive status and error messages. Can be NULL if you want to handle receiving messages in your own code.
user_dataUser data for callback function or NULL.

The callback or following preboard_receive* invocations will usually receive a dictionary with: { ShowDialog: true } If the user does not enter a passcode, after 2 minutes a timeout is reached and the device sends a dictionary with: { Timeout: true } followed by { HideDialog: true } If the user aborts the passcode entry, the device sends a dictionary: { Error: 1, ErrorString: <error string>=""> } followed by { HideDialog: true }

Returns
PREBOARD_E_SUCCESS if the command was successfully submitted, PREBOARD_E_INVALID_ARG when client is invalid, or a PREBOARD_E_* error code on error.