Skip to content

Commit 29a7a97

Browse files
committed
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
1 parent 012a406 commit 29a7a97

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

lib/services/ios-debug-service.ts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -204,12 +204,15 @@ class IOSDebugService implements IDebugService {
204204

205205
private openDebuggingClient(): IFuture<void> {
206206
return (() => {
207-
var cmd = "open -a Safari " + this.getSafariPath().wait();
207+
let inspectorPath = this.getInspectorPath().wait();
208+
let inspectorApplicationPath = path.join(inspectorPath, "NativeScript Inspector.app");
209+
let inspectorSourceLocation = path.join(inspectorPath, "Safari/Main.html");
210+
let cmd = `open -a '${inspectorApplicationPath}' --args '${inspectorSourceLocation}' '${this.$projectData.projectName}'`;
208211
this.$childProcess.exec(cmd).wait();
209212
}).future<void>()();
210213
}
211214

212-
private getSafariPath(): IFuture<string> {
215+
private getInspectorPath(): IFuture<string> {
213216
return (() => {
214217
var tnsIosPackage = "";
215218
if (this.$options.frameworkPath) {
@@ -221,8 +224,8 @@ class IOSDebugService implements IDebugService {
221224
var platformData = this.$platformsData.getPlatformData(this.platform);
222225
tnsIosPackage = this.$npmInstallationManager.install(platformData.frameworkPackageName).wait();
223226
}
224-
var safariPath = path.join(tnsIosPackage, "WebInspectorUI/Safari/Main.html");
225-
return safariPath;
227+
var inspectorPath = path.join(tnsIosPackage, "WebInspectorUI/");
228+
return inspectorPath;
226229
}).future<string>()();
227230
}
228231
}

0 commit comments

Comments
 (0)