From 29a7a972c82635fb9e9e8d06d57de253e0dfbaff Mon Sep 17 00:00:00 2001 From: Kristina Koeva Date: Thu, 18 Jun 2015 14:48:44 +0300 Subject: [PATCH] iOS runtime should provide an application that would be used to visualize the updated web inspector frontend. So open the application instead of Safari, because Safari is not able to render the frontend properly --- lib/services/ios-debug-service.ts | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/lib/services/ios-debug-service.ts b/lib/services/ios-debug-service.ts index e8511d8520..ea07fa5d98 100644 --- a/lib/services/ios-debug-service.ts +++ b/lib/services/ios-debug-service.ts @@ -204,12 +204,15 @@ class IOSDebugService implements IDebugService { private openDebuggingClient(): IFuture { return (() => { - var cmd = "open -a Safari " + this.getSafariPath().wait(); + let inspectorPath = this.getInspectorPath().wait(); + let inspectorApplicationPath = path.join(inspectorPath, "NativeScript Inspector.app"); + let inspectorSourceLocation = path.join(inspectorPath, "Safari/Main.html"); + let cmd = `open -a '${inspectorApplicationPath}' --args '${inspectorSourceLocation}' '${this.$projectData.projectName}'`; this.$childProcess.exec(cmd).wait(); }).future()(); } - private getSafariPath(): IFuture { + private getInspectorPath(): IFuture { return (() => { var tnsIosPackage = ""; if (this.$options.frameworkPath) { @@ -221,8 +224,8 @@ class IOSDebugService implements IDebugService { var platformData = this.$platformsData.getPlatformData(this.platform); tnsIosPackage = this.$npmInstallationManager.install(platformData.frameworkPackageName).wait(); } - var safariPath = path.join(tnsIosPackage, "WebInspectorUI/Safari/Main.html"); - return safariPath; + var inspectorPath = path.join(tnsIosPackage, "WebInspectorUI/"); + return inspectorPath; }).future()(); } }