mirror of
https://github.com/jkcoxson/idevice.git
synced 2026-03-02 14:36:16 +01:00
Add developer mode not enabled error kind
This commit is contained in:
@@ -720,6 +720,9 @@ pub enum IdeviceError {
|
|||||||
#[cfg(feature = "installation_proxy")]
|
#[cfg(feature = "installation_proxy")]
|
||||||
#[error("malformed package archive: {0}")]
|
#[error("malformed package archive: {0}")]
|
||||||
MalformedPackageArchive(#[from] async_zip::error::ZipError) = -67,
|
MalformedPackageArchive(#[from] async_zip::error::ZipError) = -67,
|
||||||
|
|
||||||
|
#[error("Developer mode is not enabled")]
|
||||||
|
DeveloperModeNotEnabled = -68,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl IdeviceError {
|
impl IdeviceError {
|
||||||
@@ -734,6 +737,8 @@ impl IdeviceError {
|
|||||||
fn from_device_error_type(e: &str, context: &plist::Dictionary) -> Option<Self> {
|
fn from_device_error_type(e: &str, context: &plist::Dictionary) -> Option<Self> {
|
||||||
if e.contains("NSDebugDescription=Canceled by user.") {
|
if e.contains("NSDebugDescription=Canceled by user.") {
|
||||||
return Some(Self::CanceledByUser);
|
return Some(Self::CanceledByUser);
|
||||||
|
} else if e.contains("Developer mode is not enabled.") {
|
||||||
|
return Some(Self::DeveloperModeNotEnabled);
|
||||||
}
|
}
|
||||||
match e {
|
match e {
|
||||||
"GetProhibited" => Some(Self::GetProhibited),
|
"GetProhibited" => Some(Self::GetProhibited),
|
||||||
@@ -881,6 +886,7 @@ impl IdeviceError {
|
|||||||
|
|
||||||
#[cfg(feature = "installation_proxy")]
|
#[cfg(feature = "installation_proxy")]
|
||||||
IdeviceError::MalformedPackageArchive(_) => -67,
|
IdeviceError::MalformedPackageArchive(_) => -67,
|
||||||
|
IdeviceError::DeveloperModeNotEnabled => -68,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user