Skip to content

Commit 29f3a3a

Browse files
committed
feat: additional checks for pairing installation
1 parent 6863118 commit 29f3a3a

1 file changed

Lines changed: 11 additions & 8 deletions

File tree

apps/plumeimpactor/src/frame.rs

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -491,14 +491,17 @@ impl PlumeFrame {
491491
.map_err(|e| format!("Failed to install app: {}", e))?;
492492

493493
if signer_settings.app.supports_pairing_file() {
494-
if let (Some(custom_identifier), Some(pairing_file_bundle_path)) = (
495-
signer.options.custom_identifier.as_ref(),
496-
signer_settings.app.pairing_file_path(),
497-
) {
498-
sender_clone.send(PlumeFrameMessage::WorkUpdated("Installing pairing record...".to_string())).ok();
499-
device.install_pairing_record(custom_identifier, &pairing_file_bundle_path)
500-
.await
501-
.map_err(|e| format!("Failed to install pairing record: {}", e))?;
494+
if let Some(usbmuxd_device) = &device.usbmuxd_device {
495+
if usbmuxd_device.connection_type == idevice::usbmuxd::Connection::Usb {
496+
if let (Some(custom_identifier), Some(pairing_file_bundle_path)) = (
497+
signer.options.custom_identifier.as_ref(),
498+
signer_settings.app.pairing_file_path(),
499+
) {
500+
device.install_pairing_record(custom_identifier, &pairing_file_bundle_path)
501+
.await
502+
.map_err(|e| format!("Failed to install pairing record: {}", e))?;
503+
}
504+
}
502505
}
503506
}
504507
}

0 commit comments

Comments
 (0)