Skip to content

Commit 604aec7

Browse files
committed
Add developer mode not enabled error kind
1 parent 9f7e57b commit 604aec7

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

idevice/src/lib.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -720,6 +720,9 @@ pub enum IdeviceError {
720720
#[cfg(feature = "installation_proxy")]
721721
#[error("malformed package archive: {0}")]
722722
MalformedPackageArchive(#[from] async_zip::error::ZipError) = -67,
723+
724+
#[error("Developer mode is not enabled")]
725+
DeveloperModeNotEnabled = -68,
723726
}
724727

725728
impl IdeviceError {
@@ -734,6 +737,8 @@ impl IdeviceError {
734737
fn from_device_error_type(e: &str, context: &plist::Dictionary) -> Option<Self> {
735738
if e.contains("NSDebugDescription=Canceled by user.") {
736739
return Some(Self::CanceledByUser);
740+
} else if e.contains("Developer mode is not enabled.") {
741+
return Some(Self::DeveloperModeNotEnabled);
737742
}
738743
match e {
739744
"GetProhibited" => Some(Self::GetProhibited),
@@ -881,6 +886,7 @@ impl IdeviceError {
881886

882887
#[cfg(feature = "installation_proxy")]
883888
IdeviceError::MalformedPackageArchive(_) => -67,
889+
IdeviceError::DeveloperModeNotEnabled => -68,
884890
}
885891
}
886892
}

0 commit comments

Comments
 (0)