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