diff --git a/lib/services/ios-project-service.ts b/lib/services/ios-project-service.ts index 3f90da7df9..85736ef068 100644 --- a/lib/services/ios-project-service.ts +++ b/lib/services/ios-project-service.ts @@ -426,11 +426,12 @@ export class IOSProjectService extends projectServiceBaseLib.PlatformProjectServ private prepareCocoapods(pluginPlatformsFolderPath: string): IFuture { return (() => { - if(!this.$fs.exists(this.projectPodFilePath).wait()) { - this.$fs.writeFile(this.projectPodFilePath, "use_frameworks!\n").wait(); - } let pluginPodFilePath = path.join(pluginPlatformsFolderPath, "Podfile"); if(this.$fs.exists(pluginPodFilePath).wait()) { + if(!this.$fs.exists(this.projectPodFilePath).wait()) { + this.$fs.writeFile(this.projectPodFilePath, "use_frameworks!\n").wait(); + } + let pluginPodFileContent = this.$fs.readText(pluginPodFilePath).wait(); let contentToWrite = this.buildPodfileContent(pluginPodFilePath, pluginPodFileContent); this.$fs.appendFile(this.projectPodFilePath, contentToWrite).wait();