@@ -690,13 +690,9 @@ export class IOSProjectService extends projectServiceBaseLib.PlatformProjectServ
690690 let pluginPodFilePath = path . join ( pluginPlatformsFolderPath , "Podfile" ) ;
691691
692692 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-
697693 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 ( ) ;
700696
701697 let project = this . createPbxProj ( ) ;
702698 project . updateBuildProperty ( "IPHONEOS_DEPLOYMENT_TARGET" , "8.0" ) ;
@@ -748,7 +744,7 @@ export class IOSProjectService extends projectServiceBaseLib.PlatformProjectServ
748744 let projectPodFileContent = this . $fs . readText ( this . projectPodFilePath ) . wait ( ) ;
749745 let contentToRemove = this . buildPodfileContent ( pluginPodFilePath , pluginPodFileContent ) ;
750746 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` ) {
752748 this . $fs . deleteFile ( this . projectPodFilePath ) . wait ( ) ;
753749 } else {
754750 this . $fs . writeFile ( this . projectPodFilePath , projectPodFileContent ) . wait ( ) ;
@@ -812,10 +808,11 @@ export class IOSProjectService extends projectServiceBaseLib.PlatformProjectServ
812808 this . mergeXcconfigFiles ( appResourcesXcconfigPath , this . pluginsReleaseXcconfigFilePath ) . wait ( ) ;
813809 }
814810
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 ) ;
816813 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 ( ) ;
819816 }
820817 } ) . future < void > ( ) ( ) ;
821818 }
0 commit comments