@@ -218,13 +218,14 @@ class IOSDebugService implements IDebugService {
218
218
219
219
private openDebuggingClient ( ) : IFuture < void > {
220
220
return ( ( ) => {
221
- let inspectorPath = this . getInspectorPath ( ) . wait ( ) ;
222
- let inspectorSourceLocation = path . join ( inspectorPath , "Safari/Main.html" ) ;
223
- let cmd : string = null ;
224
-
225
221
this . $projectDataService . initialize ( this . $projectData . projectDir ) ;
226
222
let platformData = this . $platformsData . getPlatformData ( this . platform ) ;
227
223
let frameworkVersion = this . $projectDataService . getValue ( platformData . frameworkPackageName ) . wait ( ) . version ;
224
+
225
+ let inspectorPath = this . getInspectorPath ( frameworkVersion ) . wait ( ) ;
226
+ let inspectorSourceLocation = path . join ( inspectorPath , "Safari/Main.html" ) ;
227
+ let cmd : string = null ;
228
+
228
229
if ( semver . lt ( frameworkVersion , "1.2.0" ) ) {
229
230
cmd = `open -a Safari "${ inspectorSourceLocation } "` ;
230
231
} else {
@@ -239,7 +240,7 @@ class IOSDebugService implements IDebugService {
239
240
} ) . future < void > ( ) ( ) ;
240
241
}
241
242
242
- private getInspectorPath ( ) : IFuture < string > {
243
+ private getInspectorPath ( frameworkVersion : string ) : IFuture < string > {
243
244
return ( ( ) => {
244
245
var tnsIosPackage = "" ;
245
246
if ( this . $options . frameworkPath ) {
@@ -249,7 +250,7 @@ class IOSDebugService implements IDebugService {
249
250
tnsIosPackage = path . resolve ( this . $options . frameworkPath ) ;
250
251
} else {
251
252
var platformData = this . $platformsData . getPlatformData ( this . platform ) ;
252
- tnsIosPackage = this . $npmInstallationManager . install ( platformData . frameworkPackageName ) . wait ( ) ;
253
+ tnsIosPackage = this . $npmInstallationManager . install ( platformData . frameworkPackageName , { version : frameworkVersion } ) . wait ( ) ;
253
254
}
254
255
var inspectorPath = path . join ( tnsIosPackage , "WebInspectorUI/" ) ;
255
256
return inspectorPath ;
0 commit comments