Skip to content

Commit 6f6a34d

Browse files
committed
Add about to sign callback
1 parent 3055b07 commit 6f6a34d

3 files changed

Lines changed: 14 additions & 3 deletions

File tree

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

isideload/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name = "isideload"
33
description = "Sideload iOS/iPadOS applications"
44
license = "MIT"
55
authors = ["Nicholas Sharp <nab@nabdev.me>"]
6-
version = "0.3.0"
6+
version = "0.3.1"
77
edition = "2024"
88
repository = "https://github.com/nab138/isideload"
99
documentation = "https://docs.rs/isideload"

isideload/src/sideload/sideloader.rs

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ impl Sideloader {
6868
team: Option<DeveloperTeam>,
6969
// this will be replaced with proper entitlement handling later
7070
increased_memory_limit: bool,
71+
about_to_sign_callback: Option<impl FnOnce()>,
7172
) -> Result<(PathBuf, Option<SpecialApp>), Report> {
7273
let team = match team {
7374
Some(t) => t,
@@ -167,6 +168,10 @@ impl Sideloader {
167168
provisioning_profile.encoded_profile.as_ref(),
168169
)?;
169170

171+
if let Some(callback) = about_to_sign_callback {
172+
callback();
173+
}
174+
170175
sign::sign(
171176
&mut app,
172177
&cert_identity,
@@ -189,6 +194,7 @@ impl Sideloader {
189194
app_path: PathBuf,
190195
// this is gross but will be replaced with proper entitlement handling later
191196
increased_memory_limit: bool,
197+
about_to_sign_callback: Option<impl FnOnce()>,
192198
) -> Result<Option<SpecialApp>, Report> {
193199
let device_info = IdeviceInfo::from_device(device_provider).await?;
194200

@@ -198,7 +204,12 @@ impl Sideloader {
198204
.await?;
199205

200206
let (signed_app_path, special_app) = self
201-
.sign_app(app_path, Some(team), increased_memory_limit)
207+
.sign_app(
208+
app_path,
209+
Some(team),
210+
increased_memory_limit,
211+
about_to_sign_callback,
212+
)
202213
.await?;
203214

204215
info!("Transferring App...");

0 commit comments

Comments
 (0)