iOS: Fix running on device with Xcode 15.4

The devicectl version from Xcode 15.4 does already support the
`--console` option for capturing app output, but it looks like that
doesn't reliable work for all devices. Bump the requirement for app
output to Xcode 16. It then uses the polling runner for Xcode < 16.

Fixes: QTCREATORBUG-32637
Change-Id: Ib3fb80750b283bfbd8f9cc779b6842d92b65a3cd
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
This commit is contained in:
Eike Ziller
2025-03-19 10:29:50 +01:00
parent 11d956b346
commit ecbbe36c38
2 changed files with 4 additions and 2 deletions

View File

@@ -610,8 +610,10 @@ void IosDeviceManager::monitorAvailableDevices()
bool IosDeviceManager::isDeviceCtlOutputSupported() bool IosDeviceManager::isDeviceCtlOutputSupported()
{ {
// Theoretically the devicectl from Xcode 15.4 already has the required `--console` option,
// but that is broken for some (newer?) devices (QTCREATORBUG-32637).
return instance()->m_deviceCtlVersion return instance()->m_deviceCtlVersion
&& instance()->m_deviceCtlVersion >= QVersionNumber(355, 28); // Xcode 15.4 && instance()->m_deviceCtlVersion >= QVersionNumber(397, 21); // Xcode 16.0
} }
bool IosDeviceManager::isDeviceCtlDebugSupported() bool IosDeviceManager::isDeviceCtlDebugSupported()

View File

@@ -1016,7 +1016,7 @@ IosRunWorkerFactory::IosRunWorkerFactory()
if (IosDeviceManager::isDeviceCtlOutputSupported()) if (IosDeviceManager::isDeviceCtlOutputSupported())
return new DeviceCtlRunner(control); return new DeviceCtlRunner(control);
// TODO Remove the polling runner when we decide not to support iOS 17+ devices // TODO Remove the polling runner when we decide not to support iOS 17+ devices
// with Xcode < 15.4 at all // with Xcode < 16 at all
return new DeviceCtlPollingRunner(control); return new DeviceCtlPollingRunner(control);
} }
control->setIcon(Icons::RUN_SMALL_TOOLBAR); control->setIcon(Icons::RUN_SMALL_TOOLBAR);