@@ -35,7 +35,8 @@ export class CocoaPodsService implements ICocoaPodsService {
3535 private $logger : ILogger ,
3636 private $config : IConfiguration ,
3737 private $xcconfigService : IXcconfigService ,
38- private $xcodeSelectService : XcodeSelectService
38+ private $xcodeSelectService : XcodeSelectService ,
39+ private $projectData : IProjectData ,
3940 ) {
4041 this . getCocoaPodsFromPodfile = _ . memoize (
4142 this . _getCocoaPodsFromPodfile ,
@@ -59,8 +60,12 @@ export class CocoaPodsService implements ICocoaPodsService {
5960 projectRoot : string ,
6061 xcodeProjPath : string
6162 ) : Promise < ISpawnResult > {
62- this . $logger . info ( "Installing pods..." ) ;
63+ const cocoapodUseBundleExec = this . $projectData . nsConfig . ios ?. cocoapodUseBundleExec ;
6364 let podTool = this . $config . USE_POD_SANDBOX ? "sandbox-pod" : "pod" ;
65+ if ( cocoapodUseBundleExec === true ) {
66+ podTool = `bundle exec ${ podTool } `
67+ }
68+ this . $logger . info ( `Installing pods using "${ podTool } "...` ) ;
6469 const args = [ "install" ] ;
6570
6671 if ( process . platform === "darwin" && process . arch === "arm64" ) {
@@ -71,7 +76,7 @@ export class CocoaPodsService implements ICocoaPodsService {
7176 // arch: posix_spawnp: pod: Bad CPU type in executable
7277 // in which case, we should run it natively.
7378 const res : string = await this . $childProcess
74- . exec ( " arch -x86_64 pod --version" , null , {
79+ . exec ( ` arch -x86_64 ${ podTool } --version` , null , {
7580 showStderr : true ,
7681 } )
7782 . then ( ( res ) => res . stdout + " " + res . stderr )
0 commit comments