From 5669bb96edf891f4a2c2e40de75c4a974dfc407f Mon Sep 17 00:00:00 2001 From: Fatme Havaluova Date: Thu, 3 Sep 2015 17:18:29 +0300 Subject: [PATCH] Execute pod install only when the plugin has Podfile --- lib/services/ios-project-service.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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();