Skip to content
This repository was archived by the owner on Feb 2, 2021. It is now read-only.

Commit 7732495

Browse files
FatmeFatme
Fatme
authored and
Fatme
committed
Merge pull request #425 from telerik/fatme/fix-coresimulatorbridge-connection
Fix "An error was encountered processing the command (code=146): Exception encountered connecting to CoreSimulatorBridge: Unable to connect to CoreSimulatorBridge"
2 parents 1d04d7e + 1505bf0 commit 7732495

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

mobile/ios/ios-emulator-services.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,15 +202,16 @@ class IosEmulatorServices implements Mobile.IiOSSimulatorService {
202202

203203
let runningSimulatorId = this.getRunningSimulatorId(appIdentifier).wait();
204204
let applicationPath = this.getApplicationPath(appIdentifier, runningSimulatorId).wait();
205+
let applicationName = path.basename(applicationPath);
205206
syncAction(applicationPath);
206207

207208
try {
208-
this.$childProcess.exec("killall launchd_sim").wait();
209-
this.$childProcess.exec(`xcrun simctl launch ${runningSimulatorId} ${appIdentifier}`).wait();
209+
this.$childProcess.exec(`killall ${applicationName.split(".")[0]}`).wait();
210210
} catch(e) {
211211
this.$logger.trace("Unable to kill simulator: " + e);
212212
}
213213

214+
this.$childProcess.exec(`xcrun simctl launch ${runningSimulatorId} ${appIdentifier}`).wait();
214215
}).future<void>()();
215216
}
216217
}

0 commit comments

Comments
 (0)