@@ -329,11 +329,11 @@ export class IOSProjectService extends projectServiceBaseLib.PlatformProjectServ
329
329
return this . $fs . writeFile ( this . pbxProjPath , project . writeSync ( ) ) ;
330
330
}
331
331
332
- public preparePluginNativeCode ( pluginData : IPluginData ) : IFuture < void > {
332
+ public preparePluginNativeCode ( pluginData : IPluginData , opts ?: any ) : IFuture < void > {
333
333
return ( ( ) => {
334
334
let pluginPlatformsFolderPath = pluginData . pluginPlatformsFolderPath ( IOSProjectService . IOS_PLATFORM_NAME ) ;
335
335
this . prepareFrameworks ( pluginPlatformsFolderPath , pluginData ) . wait ( ) ;
336
- this . prepareCocoapods ( pluginPlatformsFolderPath ) . wait ( ) ;
336
+ this . prepareCocoapods ( pluginPlatformsFolderPath , opts ) . wait ( ) ;
337
337
} ) . future < void > ( ) ( ) ;
338
338
}
339
339
@@ -372,8 +372,7 @@ export class IOSProjectService extends projectServiceBaseLib.PlatformProjectServ
372
372
this . $childProcess . exec ( createSchemeRubyScript , { cwd : this . platformData . projectRoot } ) . wait ( ) ;
373
373
}
374
374
375
- this . $logger . info ( "Installing pods..." ) ;
376
- this . $childProcess . exec ( "pod install" , { cwd : this . platformData . projectRoot } ) . wait ( ) ;
375
+ this . executePodInstall ( ) . wait ( ) ;
377
376
}
378
377
} ) . future < void > ( ) ( ) ;
379
378
}
@@ -418,13 +417,18 @@ export class IOSProjectService extends projectServiceBaseLib.PlatformProjectServ
418
417
} ) . future < void > ( ) ( ) ;
419
418
}
420
419
420
+ private executePodInstall ( ) : IFuture < any > {
421
+ this . $logger . info ( "Installing pods..." ) ;
422
+ return this . $childProcess . exec ( "pod install" , { cwd : this . platformData . projectRoot } ) ;
423
+ }
424
+
421
425
private prepareFrameworks ( pluginPlatformsFolderPath : string , pluginData : IPluginData ) : IFuture < void > {
422
426
return ( ( ) => {
423
427
_ . each ( this . getAllFrameworksForPlugin ( pluginData ) . wait ( ) , fileName => this . addLibrary ( path . join ( pluginPlatformsFolderPath , fileName ) ) . wait ( ) ) ;
424
428
} ) . future < void > ( ) ( ) ;
425
429
}
426
430
427
- private prepareCocoapods ( pluginPlatformsFolderPath : string ) : IFuture < void > {
431
+ private prepareCocoapods ( pluginPlatformsFolderPath : string , opts ?: any ) : IFuture < void > {
428
432
return ( ( ) => {
429
433
let pluginPodFilePath = path . join ( pluginPlatformsFolderPath , "Podfile" ) ;
430
434
if ( this . $fs . exists ( pluginPodFilePath ) . wait ( ) ) {
@@ -436,6 +440,10 @@ export class IOSProjectService extends projectServiceBaseLib.PlatformProjectServ
436
440
let contentToWrite = this . buildPodfileContent ( pluginPodFilePath , pluginPodFileContent ) ;
437
441
this . $fs . appendFile ( this . projectPodFilePath , contentToWrite ) . wait ( ) ;
438
442
}
443
+
444
+ if ( opts && opts . executePodInstall && this . $fs . exists ( pluginPodFilePath ) . wait ( ) ) {
445
+ this . executePodInstall ( ) . wait ( ) ;
446
+ }
439
447
} ) . future < void > ( ) ( ) ;
440
448
}
441
449
0 commit comments