Install an App
Install or upgrade an iOS app package.
Use the high-level install helper for local .ipa files and app directories. It
uploads the package through AFC and then calls Installation Proxy:
This example uses the first_provider() helper from the examples overview.
use idevice::utils::installation;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let provider = first_provider().await?;
installation::install_package(&provider, "./App.ipa", None).await?;
Ok(())
}Track progress with the callback variant:
installation::install_package_with_callback(
&provider,
"./App.ipa",
None,
|(percentage, _)| async move {
println!("Installing: {percentage}%");
},
(),
)
.await?;Add the needed features:
[dependencies]
idevice = { version = "0.1.64", features = ["usbmuxd", "afc", "installation_proxy"] }
tokio = { version = "1", features = ["fs", "macros", "rt-multi-thread"] }To test from a terminal, install a local .ipa:
idevice-tools ideviceinstaller install ./App.ipaUpgrade an existing app:
idevice-tools ideviceinstaller upgrade ./App.ipaThe CLI uses the same high-level installation helper and prints progress while the install or upgrade runs.
If you need to implement this from a binding, the FFI example shows the lower
level sequence: upload the IPA to /PublicStaging, connect to Installation
Proxy, then request installation.