Impliment getting app token

This commit is contained in:
nab138
2026-01-26 22:24:57 -05:00
parent f1790cec3d
commit 3b3f631315
9 changed files with 283 additions and 28 deletions

View File

@@ -5,6 +5,7 @@ edition = "2024"
[dependencies]
isideload = { path = "../../isideload" }
plist-macro = "0.1.3"
tokio = { version = "1.49.0", features = ["rt-multi-thread", "macros"] }
tracing = "0.1.44"
tracing-subscriber = "0.3.22"

View File

@@ -3,6 +3,7 @@ use std::env;
use isideload::{
anisette::remote_v3::RemoteV3AnisetteProvider, auth::apple_account::AppleAccountBuilder,
};
use plist_macro::pretty_print_dictionary;
use tracing::Level;
use tracing_subscriber::FmtSubscriber;
@@ -36,8 +37,15 @@ async fn main() {
.login(apple_password, get_2fa_code)
.await;
match account {
match &account {
Ok(a) => println!("Logged in. {}", a),
Err(e) => eprintln!("Failed to log in to Apple ID: {:?}", e),
}
let app_token = account.unwrap().get_app_token("xcode.auth").await;
match app_token {
Ok(t) => println!("App token: {}", pretty_print_dictionary(&t)),
Err(e) => eprintln!("Failed to get app token: {:?}", e),
}
}