@@ -410,14 +410,6 @@ export class IOSProjectService extends projectServiceBaseLib.PlatformProjectServ
410
410
public afterPrepareAllPlugins ( ) : IFuture < void > {
411
411
return ( ( ) => {
412
412
if ( this . $fs . exists ( this . projectPodFilePath ) . wait ( ) ) {
413
- // Check availability
414
- try {
415
- this . $childProcess . exec ( "gem which cocoapods" ) . wait ( ) ;
416
- this . $childProcess . exec ( "gem which xcodeproj" ) . wait ( ) ;
417
- } catch ( e ) {
418
- this . $errors . failWithoutHelp ( "CocoaPods or ruby gem 'xcodeproj' is not installed. Run `sudo gem install cocoapods` and try again." ) ;
419
- }
420
-
421
413
let projectPodfileContent = this . $fs . readText ( this . projectPodFilePath ) . wait ( ) ;
422
414
this . $logger . trace ( "Project Podfile content" ) ;
423
415
this . $logger . trace ( projectPodfileContent ) ;
@@ -499,9 +491,19 @@ export class IOSProjectService extends projectServiceBaseLib.PlatformProjectServ
499
491
}
500
492
501
493
private executePodInstall ( ) : IFuture < any > {
502
- this . $logger . info ( "Installing pods..." ) ;
503
- let podTool = this . $config . USE_POD_SANDBOX ? "sandbox-pod" : "pod" ;
504
- return this . $childProcess . spawnFromEvent ( podTool , [ "install" ] , "close" , { cwd : this . platformData . projectRoot , stdio : 'inherit' } ) ;
494
+ return ( ( ) => {
495
+ // Check availability
496
+ try {
497
+ this . $childProcess . exec ( "gem which cocoapods" ) . wait ( ) ;
498
+ this . $childProcess . exec ( "gem which xcodeproj" ) . wait ( ) ;
499
+ } catch ( e ) {
500
+ this . $errors . failWithoutHelp ( "CocoaPods or ruby gem 'xcodeproj' is not installed. Run `sudo gem install cocoapods` and try again." ) ;
501
+ }
502
+
503
+ this . $logger . info ( "Installing pods..." ) ;
504
+ let podTool = this . $config . USE_POD_SANDBOX ? "sandbox-pod" : "pod" ;
505
+ return this . $childProcess . spawnFromEvent ( podTool , [ "install" ] , "close" , { cwd : this . platformData . projectRoot , stdio : 'inherit' } ) . wait ( ) ;
506
+ } ) . future < any > ( ) ( ) ;
505
507
}
506
508
507
509
private prepareFrameworks ( pluginPlatformsFolderPath : string , pluginData : IPluginData ) : IFuture < void > {
0 commit comments