Skip to content

chore(scripts): detect wired iOS device via tunnelState, not transportType - #547

Merged
alichherawalla merged 1 commit into
mainfrom
chore/ios-device-tunnelstate-detection
Jul 15, 2026
Merged

alichherawalla merged 1 commit into
mainfrom
chore/ios-device-tunnelstate-detection

Conversation

@alichherawalla

@alichherawalla alichherawalla commented Jul 15, 2026 •

Copy link
Copy Markdown
Collaborator

What

scripts/ios-device.sh (used to pull the on-device offgrid-debug.log over the cable) picked the target device by connectionProperties.transportType != "None".

Why

On modern setups the phone is reached over the CoreDevice network tunnel, so transportType reads "None" even for a fully-connected wired device — the old filter matched nothing and device detection failed.

Change

Select on connectionProperties.tunnelState == "connected" — the field devicectl itself uses to decide reachability (its list devices prints State=connected for exactly these devices). Behavior is otherwise unchanged: the detector still never exits non-zero when no device is found, so the friendly guard reports it instead of set -e aborting mid-detection.

Scope

One file, dev-tooling only. No app/runtime code touched.

Summary by CodeRabbit

  • Bug Fixes
    • Improved physical iOS device detection by recognizing devices with an active connected tunnel.
    • Device selection now reliably chooses the correct device when transport status reports unavailable despite an established connection.

…tType

ios-device.sh (used to pull the on-device offgrid-debug.log) selected the target
by connectionProperties.transportType != "None". On modern setups the phone is
reached over the CoreDevice network tunnel, so transportType reads "None" even
for a fully-connected wired device, and the old filter matched nothing. Select on
connectionProperties.tunnelState == "connected" instead — the field devicectl
itself uses to decide reachability (its own list-devices prints State=connected
for exactly these). Still never exits non-zero when no device is found, so the
friendly guard reports it rather than set -e aborting mid-detection.
@qodo-code-review

Copy link
Copy Markdown

ⓘ Qodo reviews are paused because your trial has ended. Ask your workspace admin to add credits to resume reviews. Manage billing

@coderabbitai

coderabbitai Bot commented Jul 15, 2026 •

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: ece613e3-77a3-4efa-b2e1-4da8e22f5899

📥 Commits

Reviewing files that changed from the base of the PR and between 7280b52 and a4635d4.

📒 Files selected for processing (1)
  • scripts/ios-device.sh

📝 Walkthrough

Walkthrough

scripts/ios-device.sh changes physical iOS device auto-detection to select the first device with connectionProperties.tunnelState == "connected" and updates the surrounding explanation.

Changes

iOS device detection

Layer / File(s) Summary
Reachable device selection
scripts/ios-device.sh
The detection comments and detect_device_id() predicate now use connected tunnel state instead of non-None transport type when choosing a device UDID.

Estimated code review effort: 2 (Simple) | ~5 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title is clear, specific, and matches the main change: switching iOS device detection from transportType to tunnelState.
Description check ✅ Passed It clearly explains what changed, why, and the scope, though the template’s Type of Change, Checklist, and Related Issues sections are not filled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/ios-device-tunnelstate-detection

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@gitar-bot

gitar-bot Bot commented Jul 15, 2026

Copy link
Copy Markdown
Code Review ✅ Approved

Updates iOS device detection in scripts/ios-device.sh to use tunnelState instead of transportType, ensuring compatibility with CoreDevice network tunnels. No issues found.

Options

Auto-apply is off → Gitar will not commit updates to this branch.
Display: compact → Showing less information.

Comment with these commands to change the behavior for this request:

Auto-apply Compact
gitar auto-apply:on         
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Gitar

@sonarqubecloud

Copy link
Copy Markdown

@alichherawalla
alichherawalla merged commit cc773e1 into main Jul 15, 2026
7 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant