@@ -690,13 +690,9 @@ export class IOSProjectService extends projectServiceBaseLib.PlatformProjectServ
690
690
let pluginPodFilePath = path . join ( pluginPlatformsFolderPath , "Podfile" ) ;
691
691
692
692
if ( this . $fs . exists ( pluginPodFilePath ) . wait ( ) ) {
693
- if ( ! this . $fs . exists ( this . projectPodFilePath ) . wait ( ) ) {
694
- this . $fs . writeFile ( this . projectPodFilePath , "use_frameworks!\n" ) . wait ( ) ;
695
- }
696
-
697
693
let pluginPodFileContent = this . $fs . readText ( pluginPodFilePath ) . wait ( ) ;
698
- let contentToWrite = this . buildPodfileContent ( pluginPodFilePath , pluginPodFileContent ) ;
699
- this . $fs . appendFile ( this . projectPodFilePath , contentToWrite ) . wait ( ) ;
694
+ let contentToWrite = `use_frameworks! ${ os . EOL } ${ os . EOL } target " ${ this . $projectData . projectName } " do ${ os . EOL } ${ this . buildPodfileContent ( pluginPodFilePath , pluginPodFileContent ) } ${ os . EOL } end` ;
695
+ this . $fs . writeFile ( this . projectPodFilePath , contentToWrite ) . wait ( ) ;
700
696
701
697
let project = this . createPbxProj ( ) ;
702
698
project . updateBuildProperty ( "IPHONEOS_DEPLOYMENT_TARGET" , "8.0" ) ;
@@ -748,7 +744,7 @@ export class IOSProjectService extends projectServiceBaseLib.PlatformProjectServ
748
744
let projectPodFileContent = this . $fs . readText ( this . projectPodFilePath ) . wait ( ) ;
749
745
let contentToRemove = this . buildPodfileContent ( pluginPodFilePath , pluginPodFileContent ) ;
750
746
projectPodFileContent = helpers . stringReplaceAll ( projectPodFileContent , contentToRemove , "" ) ;
751
- if ( projectPodFileContent . trim ( ) === " use_frameworks!" ) {
747
+ if ( projectPodFileContent . trim ( ) === ` use_frameworks!${ os . EOL } ${ os . EOL } target " ${ this . $projectData . projectName } " do ${ os . EOL } ${ os . EOL } end` ) {
752
748
this . $fs . deleteFile ( this . projectPodFilePath ) . wait ( ) ;
753
749
} else {
754
750
this . $fs . writeFile ( this . projectPodFilePath , projectPodFileContent ) . wait ( ) ;
@@ -812,10 +808,11 @@ export class IOSProjectService extends projectServiceBaseLib.PlatformProjectServ
812
808
this . mergeXcconfigFiles ( appResourcesXcconfigPath , this . pluginsReleaseXcconfigFilePath ) . wait ( ) ;
813
809
}
814
810
815
- let podFolder = path . join ( this . platformData . projectRoot , "Pods/Target Support Files/Pods/" ) ;
811
+ let podFilesRootDirName = path . join ( "Pods" , "Target Support Files" , `Pods-${ this . $projectData . projectName } ` ) ;
812
+ let podFolder = path . join ( this . platformData . projectRoot , podFilesRootDirName ) ;
816
813
if ( this . $fs . exists ( podFolder ) . wait ( ) ) {
817
- this . mergeXcconfigFiles ( path . join ( this . platformData . projectRoot , "Pods/Target Support Files/ Pods/Pods. debug.xcconfig" ) , this . pluginsDebugXcconfigFilePath ) . wait ( ) ;
818
- this . mergeXcconfigFiles ( path . join ( this . platformData . projectRoot , "Pods/Target Support Files/ Pods/Pods. release.xcconfig" ) , this . pluginsReleaseXcconfigFilePath ) . wait ( ) ;
814
+ this . mergeXcconfigFiles ( path . join ( this . platformData . projectRoot , podFilesRootDirName , ` Pods- ${ this . $projectData . projectName } . debug.xcconfig` ) , this . pluginsDebugXcconfigFilePath ) . wait ( ) ;
815
+ this . mergeXcconfigFiles ( path . join ( this . platformData . projectRoot , podFilesRootDirName , ` Pods- ${ this . $projectData . projectName } . release.xcconfig` ) , this . pluginsReleaseXcconfigFilePath ) . wait ( ) ;
819
816
}
820
817
} ) . future < void > ( ) ( ) ;
821
818
}
0 commit comments