Skip to content

feat(devicectl): Use devicectl for deploying to devices#1636

Draft
dpogue wants to merge 1 commit intoapache:masterfrom
dpogue:devicectl
Draft

feat(devicectl): Use devicectl for deploying to devices#1636
dpogue wants to merge 1 commit intoapache:masterfrom
dpogue:devicectl

Conversation

@dpogue
Copy link
Copy Markdown
Member

@dpogue dpogue commented Mar 13, 2026

Platforms affected

iOS

Motivation and Context

ios-deploy does not properly handle deploying to newer iOS versions, and Xcode now includes a built-in devicectl tool for this purpose (with the caveat that it does not handle deploying to older iOS versions <17).

This also allows us to slowly transition away from requiring a global installation of the ios-deploy tool, whose licence prevents its direct inclusion or distribution with cordova-ios.

Ref #419
Closes #429
Closes #1594

Description

Bring in a new devicectl library to support using devicectl to install and launch apps on connected devices. We keep ios-deploy as a fallback.

The format of device target identifiers is different between devicectl and ios-deploy namely in that the UDID from devicectl includes a dash. Currently we use that dash to determine (given a target ID) whether to invoke devicectl or ios-deploy but I'd like to find a way to avoid that. It would be nice to be able to provide something like --target="My iPhone" (which devicectl will happily support) instead of --target="lotsOfNumbers".

Testing

Manual testing deploying an app to a connected iOS 26 device.

Needs more unit tests.

Checklist

  • I've run the tests to see all new and existing tests pass
  • I added automated test coverage as appropriate for this change
  • If this Pull Request resolves an issue, I linked to the issue in the text above (and used the correct keyword to close issues using keywords)

@dpogue dpogue added this to the 8.1.0 milestone Mar 13, 2026
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Mar 13, 2026

Codecov Report

❌ Patch coverage is 40.40404% with 59 lines in your changes missing coverage. Please review.
✅ Project coverage is 79.99%. Comparing base (49a97b3) to head (699e356).
⚠️ Report is 3 commits behind head on master.

Files with missing lines Patch % Lines
lib/run.js 10.60% 59 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1636      +/-   ##
==========================================
- Coverage   80.21%   79.99%   -0.23%     
==========================================
  Files          18       18              
  Lines        5312     5358      +46     
==========================================
+ Hits         4261     4286      +25     
- Misses       1051     1072      +21     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Copy Markdown
Member

@erisu erisu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Tested:

  • npm t
  • platform add
  • build ios
  • run ios
    • Confirmed that it called devicectl.install

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.

Device deploy fails on Xcode 26 / iOS 26: ios-deploy requires DeveloperDiskImage.dmg (DDI-only) Use node-ios-device to deploy

3 participants