@@ -207,13 +207,14 @@ class IOSDebugService implements IDebugService {
207207
208208 private openDebuggingClient ( ) : IFuture < void > {
209209 return ( ( ) => {
210- let inspectorPath = this . getInspectorPath ( ) . wait ( ) ;
211- let inspectorSourceLocation = path . join ( inspectorPath , "Safari/Main.html" ) ;
212- let cmd : string = null ;
213-
214210 this . $projectDataService . initialize ( this . $projectData . projectDir ) ;
215211 let platformData = this . $platformsData . getPlatformData ( this . platform ) ;
216212 let frameworkVersion = this . $projectDataService . getValue ( platformData . frameworkPackageName ) . wait ( ) . version ;
213+
214+ let inspectorPath = this . getInspectorPath ( frameworkVersion ) . wait ( ) ;
215+ let inspectorSourceLocation = path . join ( inspectorPath , "Safari/Main.html" ) ;
216+ let cmd : string = null ;
217+
217218 if ( semver . lt ( frameworkVersion , "1.2.0" ) ) {
218219 cmd = `open -a Safari "${ inspectorSourceLocation } "` ;
219220 } else {
@@ -228,7 +229,7 @@ class IOSDebugService implements IDebugService {
228229 } ) . future < void > ( ) ( ) ;
229230 }
230231
231- private getInspectorPath ( ) : IFuture < string > {
232+ private getInspectorPath ( frameworkVersion : string ) : IFuture < string > {
232233 return ( ( ) => {
233234 var tnsIosPackage = "" ;
234235 if ( this . $options . frameworkPath ) {
@@ -238,7 +239,7 @@ class IOSDebugService implements IDebugService {
238239 tnsIosPackage = path . resolve ( this . $options . frameworkPath ) ;
239240 } else {
240241 var platformData = this . $platformsData . getPlatformData ( this . platform ) ;
241- tnsIosPackage = this . $npmInstallationManager . install ( platformData . frameworkPackageName ) . wait ( ) ;
242+ tnsIosPackage = this . $npmInstallationManager . install ( platformData . frameworkPackageName , { version : frameworkVersion } ) . wait ( ) ;
242243 }
243244 var inspectorPath = path . join ( tnsIosPackage , "WebInspectorUI/" ) ;
244245 return inspectorPath ;
0 commit comments