mirror of
https://github.com/nab138/isideload.git
synced 2026-03-02 06:26:16 +01:00
Patch for dev accounts
This commit is contained in:
2
Cargo.lock
generated
2
Cargo.lock
generated
@@ -1170,7 +1170,7 @@ checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf"
|
||||
|
||||
[[package]]
|
||||
name = "isideload"
|
||||
version = "0.1.4"
|
||||
version = "0.1.5"
|
||||
dependencies = [
|
||||
"futures",
|
||||
"hex",
|
||||
|
||||
5
examples/minimal/.gitignore
vendored
Normal file
5
examples/minimal/.gitignore
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
.zsign_cache
|
||||
keys
|
||||
*.ipa
|
||||
state.plist
|
||||
*.mobileprovision
|
||||
@@ -3,7 +3,7 @@ name = "isideload"
|
||||
description = "Sideload iOS/iPadOS applications"
|
||||
license = "MPL-2.0"
|
||||
authors = ["Nicholas Sharp <nab@nabdev.me>"]
|
||||
version = "0.1.4"
|
||||
version = "0.1.5"
|
||||
edition = "2024"
|
||||
repository = "https://github.com/nab138/isideload"
|
||||
documentation = "https://docs.rs/isideload"
|
||||
|
||||
@@ -382,14 +382,27 @@ impl DeveloperSession {
|
||||
});
|
||||
}
|
||||
|
||||
let max_quantity = response
|
||||
.get("maxQuantity")
|
||||
.and_then(|v| v.as_unsigned_integer())
|
||||
.ok_or(Error::Parse("maxQuantity".to_string()))?;
|
||||
let available_quantity = response
|
||||
.get("availableQuantity")
|
||||
.and_then(|v| v.as_unsigned_integer())
|
||||
.ok_or(Error::Parse("availableQuantity".to_string()))?;
|
||||
let max_quantity = if response.contains_key("maxQuantity") {
|
||||
Some(
|
||||
response
|
||||
.get("maxQuantity")
|
||||
.and_then(|v| v.as_unsigned_integer())
|
||||
.ok_or(Error::Parse("maxQuantity".to_string()))?,
|
||||
)
|
||||
} else {
|
||||
None
|
||||
};
|
||||
|
||||
let available_quantity = if response.contains_key("availableQuantity") {
|
||||
Some(
|
||||
response
|
||||
.get("availableQuantity")
|
||||
.and_then(|v| v.as_unsigned_integer())
|
||||
.ok_or(Error::Parse("availableQuantity".to_string()))?,
|
||||
)
|
||||
} else {
|
||||
None
|
||||
};
|
||||
|
||||
Ok(ListAppIdsResponse {
|
||||
app_ids: result,
|
||||
@@ -687,8 +700,8 @@ pub struct AppId {
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
pub struct ListAppIdsResponse {
|
||||
pub app_ids: Vec<AppId>,
|
||||
pub max_quantity: u64,
|
||||
pub available_quantity: u64,
|
||||
pub max_quantity: Option<u64>,
|
||||
pub available_quantity: Option<u64>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
|
||||
@@ -165,15 +165,17 @@ pub async fn sideload_app(
|
||||
})
|
||||
.collect::<Vec<_>>();
|
||||
|
||||
if app_ids_to_register.len() > list_app_id_response.available_quantity.try_into().unwrap() {
|
||||
return error_and_return(
|
||||
&logger,
|
||||
Error::InvalidBundle(format!(
|
||||
"This app requires {} app ids, but you only have {} available",
|
||||
app_ids_to_register.len(),
|
||||
list_app_id_response.available_quantity
|
||||
)),
|
||||
);
|
||||
if let Some(available) = list_app_id_response.available_quantity {
|
||||
if app_ids_to_register.len() > available.try_into().unwrap() {
|
||||
return error_and_return(
|
||||
&logger,
|
||||
Error::InvalidBundle(format!(
|
||||
"This app requires {} app ids, but you only have {} available",
|
||||
app_ids_to_register.len(),
|
||||
available
|
||||
)),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
for bundle in app_ids_to_register {
|
||||
|
||||
Reference in New Issue
Block a user