Skip to content

Commit

Permalink
fix(apple): do not list disconnected devices with devicectl (#247)
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasfernog authored Oct 21, 2023
1 parent 9f39389 commit cceff7e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changes/fix-devicectl-status-check.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"cargo-mobile2": "patch"
---

Fix `devicectl` listing disconnected devices.
1 change: 1 addition & 0 deletions src/apple/device/devicectl/device_list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ fn parse_device_list<'a>(json: String) -> Result<BTreeSet<Device<'a>>, DeviceLis
.into_iter()
.filter(|device| {
device.connection_properties.tunnel_state != "unavailable"
&& device.connection_properties.tunnel_state != "disconnected"
&& (device.hardware_properties.platform.contains("iOS")
|| device.hardware_properties.platform.contains("xrOS"))
})
Expand Down

0 comments on commit cceff7e

Please sign in to comment.