|
libimobiledevice
1.1.6
|
Manage applications on a device. More...
Macros | |
| #define | INSTPROXY_SERVICE_NAME "com.apple.mobile.installation_proxy" |
Typedefs | |
| typedef int16_t | instproxy_error_t |
| Represents an error code. More... | |
| typedef instproxy_client_private * | instproxy_client_t |
| The client handle. More... | |
| typedef void(* | instproxy_status_cb_t )(const char *operation, plist_t status, void *user_data) |
| Reports the status of the given operation. | |
Functions | |
| instproxy_error_t | instproxy_client_new (idevice_t device, lockdownd_service_descriptor_t service, instproxy_client_t *client) |
| Connects to the installation_proxy service on the specified device. More... | |
| instproxy_error_t | instproxy_client_start_service (idevice_t device, instproxy_client_t *client, const char *label) |
| Starts a new installation_proxy service on the specified device and connects to it. More... | |
| instproxy_error_t | instproxy_client_free (instproxy_client_t client) |
| Disconnects an installation_proxy client from the device and frees up the installation_proxy client data. More... | |
| instproxy_error_t | instproxy_browse (instproxy_client_t client, plist_t client_options, plist_t *result) |
| List installed applications. More... | |
| instproxy_error_t | instproxy_install (instproxy_client_t client, const char *pkg_path, plist_t client_options, instproxy_status_cb_t status_cb, void *user_data) |
| Install an application on the device. More... | |
| instproxy_error_t | instproxy_upgrade (instproxy_client_t client, const char *pkg_path, plist_t client_options, instproxy_status_cb_t status_cb, void *user_data) |
| Upgrade an application on the device. More... | |
| instproxy_error_t | instproxy_uninstall (instproxy_client_t client, const char *appid, plist_t client_options, instproxy_status_cb_t status_cb, void *user_data) |
| Uninstall an application from the device. More... | |
| instproxy_error_t | instproxy_lookup_archives (instproxy_client_t client, plist_t client_options, plist_t *result) |
| List archived applications. More... | |
| instproxy_error_t | instproxy_archive (instproxy_client_t client, const char *appid, plist_t client_options, instproxy_status_cb_t status_cb, void *user_data) |
| Archive an application on the device. More... | |
| instproxy_error_t | instproxy_restore (instproxy_client_t client, const char *appid, plist_t client_options, instproxy_status_cb_t status_cb, void *user_data) |
| Restore a previously archived application on the device. More... | |
| instproxy_error_t | instproxy_remove_archive (instproxy_client_t client, const char *appid, plist_t client_options, instproxy_status_cb_t status_cb, void *user_data) |
| Removes a previously archived application from the device. More... | |
| plist_t | instproxy_client_options_new () |
| Create a new client_options plist. More... | |
| void | instproxy_client_options_add (plist_t client_options,...) |
| Add one or more new key:value pairs to the given client_options. More... | |
| void | instproxy_client_options_free (plist_t client_options) |
| Free client_options plist. More... | |
| instproxy_error_t | instproxy_client_get_path_for_bundle_identifier (instproxy_client_t client, const char *bundle_id, char **path) |
| Query the device for the path of an application. More... | |
Manage applications on a device.
The client handle.
| typedef int16_t instproxy_error_t |
Represents an error code.
| instproxy_error_t instproxy_archive | ( | instproxy_client_t | client, |
| const char * | appid, | ||
| plist_t | client_options, | ||
| instproxy_status_cb_t | status_cb, | ||
| void * | user_data | ||
| ) |
Archive an application on the device.
This function tells the device to make an archive of the specified application. This results in the device creating a ZIP archive in the 'ApplicationArchives' directory and uninstalling the application.
| client | The connected installation proxy client |
| appid | ApplicationIdentifier of the app to archive. |
| client_options | The client options to use, as PLIST_DICT, or NULL. Valid options include: "SkipUninstall" -> Boolean "ArchiveType" -> "ApplicationOnly" |
| status_cb | Callback function for progress and status information. If NULL is passed, this function will run synchronously. |
| user_data | Callback data passed to status_cb. |
| instproxy_error_t instproxy_browse | ( | instproxy_client_t | client, |
| plist_t | client_options, | ||
| plist_t * | result | ||
| ) |
List installed applications.
This function runs synchronously.
| client | The connected installation_proxy client |
| client_options | The client options to use, as PLIST_DICT, or NULL. Valid client options include: "ApplicationType" -> "User" "ApplicationType" -> "System" |
| result | Pointer that will be set to a plist that will hold an array of PLIST_DICT holding information about the applications found. |
Referenced by instproxy_client_get_path_for_bundle_identifier().
| instproxy_error_t instproxy_client_free | ( | instproxy_client_t | client | ) |
Disconnects an installation_proxy client from the device and frees up the installation_proxy client data.
| client | The installation_proxy client to disconnect and free. |
| instproxy_error_t instproxy_client_get_path_for_bundle_identifier | ( | instproxy_client_t | client, |
| const char * | appid, | ||
| char ** | path | ||
| ) |
Query the device for the path of an application.
| client | The connected installation proxy client. |
| appid | ApplicationIdentifier of app to retrieve the path for. |
| path | Pointer to store the device path for the application which is set to NULL if it could not be determined. |
References instproxy_browse(), instproxy_client_options_add(), instproxy_client_options_free(), and instproxy_client_options_new().
| instproxy_error_t instproxy_client_new | ( | idevice_t | device, |
| lockdownd_service_descriptor_t | service, | ||
| instproxy_client_t * | client | ||
| ) |
Connects to the installation_proxy service on the specified device.
| device | The device to connect to |
| service | The service descriptor returned by lockdownd_start_service. |
| client | Pointer that will be set to a newly allocated instproxy_client_t upon successful return. |
Referenced by instproxy_client_start_service().
| void instproxy_client_options_add | ( | plist_t | client_options, |
| ... | |||
| ) |
Add one or more new key:value pairs to the given client_options.
| client_options | The client options to modify. |
| ... | KEY, VALUE, [KEY, VALUE], NULL |
Referenced by instproxy_client_get_path_for_bundle_identifier().
| void instproxy_client_options_free | ( | plist_t | client_options | ) |
Free client_options plist.
| client_options | The client options plist to free. Does nothing if NULL is passed. |
Referenced by instproxy_client_get_path_for_bundle_identifier().
| plist_t instproxy_client_options_new | ( | ) |
Create a new client_options plist.
Referenced by instproxy_client_get_path_for_bundle_identifier().
| instproxy_error_t instproxy_client_start_service | ( | idevice_t | device, |
| instproxy_client_t * | client, | ||
| const char * | label | ||
| ) |
Starts a new installation_proxy service on the specified device and connects to it.
| device | The device to connect to. |
| client | Pointer that will point to a newly allocated instproxy_client_t upon successful return. Must be freed using instproxy_client_free() after use. |
| label | The label to use for communication. Usually the program name. Pass NULL to disable sending the label in requests to lockdownd. |
References instproxy_client_new(), and service_client_factory_start_service().
| instproxy_error_t instproxy_install | ( | instproxy_client_t | client, |
| const char * | pkg_path, | ||
| plist_t | client_options, | ||
| instproxy_status_cb_t | status_cb, | ||
| void * | user_data | ||
| ) |
Install an application on the device.
| client | The connected installation_proxy client |
| pkg_path | Path of the installation package (inside the AFC jail) |
| client_options | The client options to use, as PLIST_DICT, or NULL. Valid options include: "iTunesMetadata" -> PLIST_DATA "ApplicationSINF" -> PLIST_DATA "PackageType" -> "Developer" If PackageType -> Developer is specified, then pkg_path points to an .app directory instead of an install package. |
| status_cb | Callback function for progress and status information. If NULL is passed, this function will run synchronously. |
| user_data | Callback data passed to status_cb. |
| instproxy_error_t instproxy_lookup_archives | ( | instproxy_client_t | client, |
| plist_t | client_options, | ||
| plist_t * | result | ||
| ) |
List archived applications.
This function runs synchronously.
| client | The connected installation_proxy client |
| client_options | The client options to use, as PLIST_DICT, or NULL. Currently there are no known client options, so pass NULL here. |
| result | Pointer that will be set to a plist containing a PLIST_DICT holding information about the archived applications found. |
| instproxy_error_t instproxy_remove_archive | ( | instproxy_client_t | client, |
| const char * | appid, | ||
| plist_t | client_options, | ||
| instproxy_status_cb_t | status_cb, | ||
| void * | user_data | ||
| ) |
Removes a previously archived application from the device.
This function removes the ZIP archive from the 'ApplicationArchives' directory.
| client | The connected installation proxy client |
| appid | ApplicationIdentifier of the archived app to remove. |
| client_options | The client options to use, as PLIST_DICT, or NULL. Currently there are no known client options, so passing NULL is fine. |
| status_cb | Callback function for progress and status information. If NULL is passed, this function will run synchronously. |
| user_data | Callback data passed to status_cb. |
| instproxy_error_t instproxy_restore | ( | instproxy_client_t | client, |
| const char * | appid, | ||
| plist_t | client_options, | ||
| instproxy_status_cb_t | status_cb, | ||
| void * | user_data | ||
| ) |
Restore a previously archived application on the device.
This function is the counterpart to instproxy_archive.
| client | The connected installation proxy client |
| appid | ApplicationIdentifier of the app to restore. |
| client_options | The client options to use, as PLIST_DICT, or NULL. Currently there are no known client options, so pass NULL here. |
| status_cb | Callback function for progress and status information. If NULL is passed, this function will run synchronously. |
| user_data | Callback data passed to status_cb. |
| instproxy_error_t instproxy_uninstall | ( | instproxy_client_t | client, |
| const char * | appid, | ||
| plist_t | client_options, | ||
| instproxy_status_cb_t | status_cb, | ||
| void * | user_data | ||
| ) |
Uninstall an application from the device.
| client | The connected installation proxy client |
| appid | ApplicationIdentifier of the app to uninstall |
| client_options | The client options to use, as PLIST_DICT, or NULL. Currently there are no known client options, so pass NULL here. |
| status_cb | Callback function for progress and status information. If NULL is passed, this function will run synchronously. |
| user_data | Callback data passed to status_cb. |
| instproxy_error_t instproxy_upgrade | ( | instproxy_client_t | client, |
| const char * | pkg_path, | ||
| plist_t | client_options, | ||
| instproxy_status_cb_t | status_cb, | ||
| void * | user_data | ||
| ) |
Upgrade an application on the device.
This function is nearly the same as instproxy_install; the difference is that the installation progress on the device is faster if the application is already installed.
| client | The connected installation_proxy client |
| pkg_path | Path of the installation package (inside the AFC jail) |
| client_options | The client options to use, as PLIST_DICT, or NULL. Valid options include: "iTunesMetadata" -> PLIST_DATA "ApplicationSINF" -> PLIST_DATA "PackageType" -> "Developer" If PackageType -> Developer is specified, then pkg_path points to an .app directory instead of an install package. |
| status_cb | Callback function for progress and status information. If NULL is passed, this function will run synchronously. |
| user_data | Callback data passed to status_cb. |
1.8.5