Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 54 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ rustls = { version = "0.23", default-features = false, features = [
"ring",
] }
image = { version = "0.25", default-features = false, features = ["png", "jpeg"] }
# Discovery
# `async` (default) is required: it enables the flume async receiver used to
# poll browse events from the tokio runtime.
mdns-sd = "0.21"
# Compression
flate2 = "1.1"
zip = "8.6"
Expand Down
14 changes: 11 additions & 3 deletions apps/plumeimpactor/src/refresh.rs
Original file line number Diff line number Diff line change
Expand Up @@ -261,9 +261,11 @@ impl RefreshDaemon {
session: &DeveloperSession,
team_id: &str,
) -> Result<(), String> {
let platform = device.developer_platform();

let team_id_string = team_id.to_string();
session
.qh_ensure_device(&team_id_string, &device.name, &device.udid)
.qh_ensure_device(&team_id_string, &device.name, &device.udid, platform)
.await
.map_err(|e| format!("Failed to ensure device: {}", e))?;

Expand Down Expand Up @@ -291,7 +293,7 @@ impl RefreshDaemon {
let mut signer = Signer::new(Some(signing_identity), options);

signer
.register_bundle(&bundle, session, &team_id.to_string(), true)
.register_bundle(&bundle, session, &team_id.to_string(), true, platform)
.await
.map_err(|e| format!("Failed to register bundle: {}", e))?;

Expand Down Expand Up @@ -332,7 +334,13 @@ impl RefreshDaemon {
let mut signer = Signer::new(None, options);

signer
.register_bundle(&bundle, session, &team_id.to_string(), true)
.register_bundle(
&bundle,
session,
&team_id.to_string(),
true,
device.developer_platform(),
)
.await
.map_err(|e| format!("Failed to register bundle: {}", e))?;

Expand Down
10 changes: 8 additions & 2 deletions apps/plumeimpactor/src/subscriptions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ pub(crate) fn device_listener() -> Subscription<Message> {
let _ = tx.unbounded_send(Message::DeviceConnected(Device {
name: "This Mac".into(),
udid: mac_udid,
product_type: None,
device_id: u32::MAX,
usbmuxd_device: None,
is_mac: true,
Expand Down Expand Up @@ -348,9 +349,14 @@ pub(crate) async fn run_installation(

send("Ensuring device is registered...".to_string(), 30);

let platform = device
.as_ref()
.map(|dev| dev.developer_platform())
.unwrap_or_default();

if let Some(dev) = &device {
session
.qh_ensure_device(team_id, &dev.name, &dev.udid)
.qh_ensure_device(team_id, &dev.name, &dev.udid, platform)
.await
.map_err(|e| e.to_string())?;
}
Expand All @@ -368,7 +374,7 @@ pub(crate) async fn run_installation(
.await
.map_err(|e| e.to_string())?;
signer
.register_bundle(&bundle, &session, team_id, false)
.register_bundle(&bundle, &session, team_id, false, platform)
.await
.map_err(|e| e.to_string())?;
signer
Expand Down
18 changes: 15 additions & 3 deletions apps/plumesign/src/commands/account.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@ use anyhow::{Ok, Result};
use clap::{Args, Subcommand};
use dialoguer::Select;

use plume_core::{AnisetteConfiguration, auth::Account, developer::DeveloperSession};
use plume_core::{
AnisetteConfiguration,
auth::Account,
developer::{DeveloperPlatform, DeveloperSession},
};
use plume_store::AccountStore;

use crate::get_data_path;
Expand Down Expand Up @@ -267,7 +271,10 @@ async fn devices(args: DevicesArgs) -> Result<()> {
args.team_id.unwrap()
};

let p = session.qh_list_devices(&team_id).await?.devices;
let p = session
.qh_list_devices(&team_id, DeveloperPlatform::default())
.await?
.devices;

log::info!("{:#?}", p);

Expand All @@ -284,7 +291,12 @@ async fn register_device(args: RegisterDeviceArgs) -> Result<()> {
};

let p = session
.qh_add_device(&team_id, &args.name, &args.udid)
.qh_add_device(
&team_id,
&args.name,
&args.udid,
DeveloperPlatform::default(),
)
.await?
.device;

Expand Down
1 change: 1 addition & 0 deletions apps/plumesign/src/commands/device.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ pub async fn execute(args: DeviceArgs) -> Result<()> {
Device {
name: "My Mac".to_string(),
udid: String::new(),
product_type: None,
device_id: 0,
usbmuxd_device: None,
is_mac: true,
Expand Down
3 changes: 3 additions & 0 deletions apps/plumesign/src/commands/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ use clap::{Parser, Subcommand};
pub mod account;
pub mod device;
pub mod macho;
pub mod pair;
pub mod sign;

#[derive(Debug, Parser)]
Expand All @@ -29,4 +30,6 @@ pub enum Commands {
Account(account::AccountArgs),
/// Device management commands
Device(device::DeviceArgs),
/// Pair with a device over the network
Pair(pair::PairArgs),
}
Loading