feat(macOS): add Apple TV wireless pairing - #256
Conversation
| let mut mobile_provision = MobileProvision::load_with_bytes( | ||
| profiles.provisioning_profile.encoded_profile.as_ref().to_vec(), | ||
| )?; | ||
| let requested_entitlements = macho.entitlements().as_ref(); |
There was a problem hiding this comment.
Is there a reason why signing code has been touched? At least to me theres no reason why this should've been modified, as well as the API for communicating with developer services. I've tested it before with an ATV4K and it should work fine without these changes.
There was a problem hiding this comment.
I figured atv provisioning fields would be nice given full parity and my provisioning profile for the tv was expired therefore handling those cases seemed prudent, but can get rid of that as well
| } | ||
| } | ||
|
|
||
| #[cfg(test)] |
There was a problem hiding this comment.
There's a lot of unnecessary tests.
| let (pin_sender, pin_receiver) = std::sync::mpsc::sync_channel::<String>(1); | ||
| let device_name = device_name.to_string(); | ||
| let mut pairing_task = tokio::task::spawn_blocking(move || -> Result<(), String> { | ||
| let mut child = std::process::Command::new("xcrun") |
There was a problem hiding this comment.
We cannot use xcrun at all, many people who use Impactor are not going to be downloading Xcode (which is huge, gigabytes in data) just to be running this.
| } else { | ||
| self.name.clone() | ||
| }; | ||
| let output = std::process::Command::new("xcrun") |
There was a problem hiding this comment.
We can't use any platform specific programs for pairing, use the idevice crate and look at the tools for examples.
| Ok(()) | ||
| } | ||
|
|
||
| #[cfg(test)] |
There was a problem hiding this comment.
tests are fun :( but they shall disappear
| keys | ||
| } | ||
|
|
||
| fn device_quality(device: &Device) -> usize { |
There was a problem hiding this comment.
usbmuxd shows some bogus device records so tvs show up twice, coredevice seemed better but I reckon just simple dedupes make some more sense
| .qh_ensure_device(&team_id_string, &device.name, &device.udid) | ||
| .await | ||
| .map_err(|e| format!("Failed to ensure device: {}", e))?; | ||
| if !device.is_mac { |
There was a problem hiding this comment.
Mac devices need to be registered to sideload properly. There's many things in code that are done for a reason.
needed to sideload mutube again as it expired on my tv, so here we are I guess, tested and works using 2nd gen 4k atv but someone should probably test a bit more extensiveley across other devices
also fixes the provisioning for atv installs