From 2d09d07526e369b2c358991b439938deca5dcc8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=94=D0=BC=D0=B8=D1=82=D1=80=D0=B8=D0=B9=20=D0=9C=D1=8F?= =?UTF-8?q?=D1=81=D0=BD=D0=B8=D0=BA=D0=BE=D0=B2?= Date: Sun, 31 May 2026 19:51:07 +0500 Subject: [PATCH] Handle iOS app launch failures after install --- lib/units/ios-device/plugins/install.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/lib/units/ios-device/plugins/install.js b/lib/units/ios-device/plugins/install.js index a0f9e1933..46fed544e 100755 --- a/lib/units/ios-device/plugins/install.js +++ b/lib/units/ios-device/plugins/install.js @@ -70,14 +70,22 @@ export default syrup.serial() promiseutil.periodicNotify(installApp(options.serial, path), 250) .progressed(() => { guesstimate = Math.min(95, guesstimate + 1.5 * (95 - guesstimate) / 35) - sendProgress('installing_app', guesstimate) + sendProgress('installing_app', Math.round(guesstimate)) }) .then((result) => { push.send([channel, reply.okay('INSTALL_SUCCEEDED')]) if (message.launch) { - const bundleId = result.match(/.[\w.-]+[\w-]/) + const bundleId = String(result).match(/Installed:?\s+([\w.-]+)/i)?.[1] + if (!bundleId) { + log.warn('Unable to detect bundle id from idb install output: %s', result) + return + } + sendProgress('launching_app', 100) launchApp(options.serial, bundleId) + .catch((err) => { + log.warn('Application launch after install failed: %s', err.message) + }) } }) .catch((err) => {