Skip to content

Commit 3e3aa3d

Browse files
committed
Merge pull request #1547 from NativeScript/cankov/app-resources-xcconfig
Allow build.xcconfig in app/App_Resources/iOS/build.xcconfig
2 parents a08d207 + f220d3b commit 3e3aa3d

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

lib/services/ios-project-service.ts

+8-3
Original file line numberDiff line numberDiff line change
@@ -393,6 +393,7 @@ export class IOSProjectService extends projectServiceBaseLib.PlatformProjectServ
393393
public processConfigurationFilesFromAppResources(): IFuture<void> {
394394
return (() => {
395395
this.mergeInfoPlists().wait();
396+
this.mergeProjectXcconfigFiles().wait();
396397
_(this.getAllInstalledPlugins().wait())
397398
.map(pluginData => this.$pluginVariablesService.interpolatePluginVariables(pluginData, this.platformData.configurationFilePath).wait())
398399
.value();
@@ -565,8 +566,6 @@ export class IOSProjectService extends projectServiceBaseLib.PlatformProjectServ
565566

566567
this.executePodInstall().wait();
567568
}
568-
569-
this.regeneratePluginsXcconfigFile().wait();
570569
}).future<void>()();
571570
}
572571

@@ -778,7 +777,7 @@ export class IOSProjectService extends projectServiceBaseLib.PlatformProjectServ
778777
}).future<void>()();
779778
}
780779

781-
private regeneratePluginsXcconfigFile(): IFuture<void> {
780+
private mergeProjectXcconfigFiles(): IFuture<void> {
782781
return (() => {
783782
this.$fs.deleteFile(this.pluginsDebugXcconfigFilePath).wait();
784783
this.$fs.deleteFile(this.pluginsReleaseXcconfigFilePath).wait();
@@ -793,6 +792,12 @@ export class IOSProjectService extends projectServiceBaseLib.PlatformProjectServ
793792
}
794793
}
795794

795+
let appResourcesXcconfigPath = path.join(this.$projectData.projectDir, constants.APP_FOLDER_NAME, constants.APP_RESOURCES_FOLDER_NAME, this.platformData.normalizedPlatformName, "build.xcconfig");
796+
if (this.$fs.exists(appResourcesXcconfigPath).wait()) {
797+
this.mergeXcconfigFiles(appResourcesXcconfigPath, this.pluginsDebugXcconfigFilePath).wait();
798+
this.mergeXcconfigFiles(appResourcesXcconfigPath, this.pluginsReleaseXcconfigFilePath).wait();
799+
}
800+
796801
let podFolder = path.join(this.platformData.projectRoot, "Pods/Target Support Files/Pods/");
797802
if (this.$fs.exists(podFolder).wait()) {
798803
this.mergeXcconfigFiles(path.join(this.platformData.projectRoot, "Pods/Target Support Files/Pods/Pods.debug.xcconfig"), this.pluginsDebugXcconfigFilePath).wait();

0 commit comments

Comments
 (0)