CoreDevice framework is unable to route iOS app's stdout

I am trying to automate the installation, launch, and monitoring of iOS apps. Historically we have used ios-deploy, but as of XCode 15 and iOS 17+, using ios-deploy no longer works. See issue

The CoreDevice framework and xcrun's devicectl command has many of the features I require, but in contrast to ios-deploy, executing

xcrun devicectl process launch --device <uuid> <bundle>

does not route the launched app's stdout the the devicectl process. From the help menu, it looks like adding the --console flag will do exactly what I want, which routes the app stdout to the devicectl process and waits for the app to exit.

However, if I try running

xcrun devicectl process launch --console --device <uuid> <bundle>

I receive the following error

ERROR: The specified operation is not implemented on this device. (com.apple.dt.CoreDeviceError error 1 (0x01))
--------------------------------------------------------------------------------
ERROR:   The operation couldn't be completed. (CoreDevice.ActionError error 2.)
      NSDebugDescription = This operation cannot be performed on this device.

It's rather unclear on what the actual issue is, and I can't find any CoreDevice documentation online to help me deduce what these error codes refer to. Any help would be appreciated!

Answered by DTS Engineer in 790039022

There are improvements to this functionality in Xcode 16, as listed in the Release Notes:

devicectl device process launch now supports a --console option to capture standard output and standard error from the launched app and to wait until the app exits. (123516594)

Please give the Xcode 16 beta a try, and report any continuing issues affecting your development workflow as bug reports.

If you have any questions about filing a bug report, take a look at Bug Reporting: How and Why?

There are improvements to this functionality in Xcode 16, as listed in the Release Notes:

devicectl device process launch now supports a --console option to capture standard output and standard error from the launched app and to wait until the app exits. (123516594)

Please give the Xcode 16 beta a try, and report any continuing issues affecting your development workflow as bug reports.

If you have any questions about filing a bug report, take a look at Bug Reporting: How and Why?

CoreDevice framework is unable to route iOS app's stdout
 
 
Q