mirror of
https://github.com/jkcoxson/idevice.git
synced 2026-03-02 14:36:16 +01:00
House arrest macro plist creation
This commit is contained in:
@@ -4,8 +4,6 @@
|
|||||||
//! installed on an iOS device. This is typically used for file transfer and inspection of
|
//! installed on an iOS device. This is typically used for file transfer and inspection of
|
||||||
//! app-specific data during development or diagnostics.
|
//! app-specific data during development or diagnostics.
|
||||||
|
|
||||||
use plist::{Dictionary, Value};
|
|
||||||
|
|
||||||
use crate::{Idevice, IdeviceError, IdeviceService, obf};
|
use crate::{Idevice, IdeviceError, IdeviceService, obf};
|
||||||
|
|
||||||
use super::afc::AfcClient;
|
use super::afc::AfcClient;
|
||||||
@@ -91,10 +89,12 @@ impl HouseArrestClient {
|
|||||||
/// # Errors
|
/// # Errors
|
||||||
/// Returns `IdeviceError` if the request or AFC setup fails
|
/// Returns `IdeviceError` if the request or AFC setup fails
|
||||||
async fn vend(mut self, bundle_id: String, cmd: String) -> Result<AfcClient, IdeviceError> {
|
async fn vend(mut self, bundle_id: String, cmd: String) -> Result<AfcClient, IdeviceError> {
|
||||||
let mut req = Dictionary::new();
|
let req = crate::plist!({
|
||||||
req.insert("Command".into(), cmd.into());
|
"Command": cmd,
|
||||||
req.insert("Identifier".into(), bundle_id.into());
|
"Identifier": bundle_id
|
||||||
self.idevice.send_plist(Value::Dictionary(req)).await?;
|
});
|
||||||
|
|
||||||
|
self.idevice.send_plist(req).await?;
|
||||||
self.idevice.read_plist().await?;
|
self.idevice.read_plist().await?;
|
||||||
|
|
||||||
Ok(AfcClient::new(self.idevice))
|
Ok(AfcClient::new(self.idevice))
|
||||||
|
|||||||
Reference in New Issue
Block a user