Skip to content

Commit bf48a54

Browse files
FatmeFatme
Fatme
authored and
Fatme
committed
Merge pull request #864 from NativeScript/fatme/do-not-execute-pod-install-every-time
Execute pod install only when the plugin has Podfile
2 parents 0debe12 + 5669bb9 commit bf48a54

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

lib/services/ios-project-service.ts

+4-3
Original file line numberDiff line numberDiff line change
@@ -426,11 +426,12 @@ export class IOSProjectService extends projectServiceBaseLib.PlatformProjectServ
426426

427427
private prepareCocoapods(pluginPlatformsFolderPath: string): IFuture<void> {
428428
return (() => {
429-
if(!this.$fs.exists(this.projectPodFilePath).wait()) {
430-
this.$fs.writeFile(this.projectPodFilePath, "use_frameworks!\n").wait();
431-
}
432429
let pluginPodFilePath = path.join(pluginPlatformsFolderPath, "Podfile");
433430
if(this.$fs.exists(pluginPodFilePath).wait()) {
431+
if(!this.$fs.exists(this.projectPodFilePath).wait()) {
432+
this.$fs.writeFile(this.projectPodFilePath, "use_frameworks!\n").wait();
433+
}
434+
434435
let pluginPodFileContent = this.$fs.readText(pluginPodFilePath).wait();
435436
let contentToWrite = this.buildPodfileContent(pluginPodFilePath, pluginPodFileContent);
436437
this.$fs.appendFile(this.projectPodFilePath, contentToWrite).wait();

0 commit comments

Comments
 (0)