Any way to disable automatically searching sources for Info.plist files?
Hi there,
Currently, if the INFOPLIST_FILE build setting is not specified, Info.plist files are automatically searched for in the sources. However, the paths specified in the sources section are searched without regard to includes or excludes paths. So even if I exclude the Info.plist file from a source directory, it will still be found. Is this a bug? (I'm using XcodeGen version 2.25.0)
There also does not seem to be a way to disable this automatic search for Info.plist files (correct me if I am wrong). I've tried setting settingPresets: none but it did not disable this behavior.
My current workaround is to include each file individually instead of including the whole source directory to avoid this automatic searching.
This feature would be useful as I would prefer to specify INFOPLIST_FILE only in configuration files, rather than explicitly specifying them or having them included automatically (might include the wrong files) in target-level build settings.
Thanks!
My workaround is to set INFOPLIST_FILE: "" in a common template.
Currently facing the same issue. Im using this workaround in target template so configuration file settings are respected:
settings:
INFOPLIST_FILE: $(inherited)
But yes, it would be good to be able to disable this automatic info.plist search/resolution.
Would someone like to pick this up? It should involve
- adding a
disableInfoPlistSearchingoption to SpecOptions https://github.com/yonaskolb/XcodeGen/blob/d99e4486475593fddcffe2cd44e76174b8cf294e/Sources/ProjectSpec/SpecOptions.swift#L5 - applying that in the logic here https://github.com/yonaskolb/XcodeGen/blob/d99e4486475593fddcffe2cd44e76174b8cf294e/Sources/XcodeGenKit/PBXProjGenerator.swift#L1504
- adding a unit test around here https://github.com/yonaskolb/XcodeGen/blob/d99e4486475593fddcffe2cd44e76174b8cf294e/Tests/XcodeGenKitTests/SourceGeneratorTests.swift#L674
- add some documentation to https://github.com/yonaskolb/XcodeGen/blob/d99e4486475593fddcffe2cd44e76174b8cf294e/Docs/ProjectSpec.md?plain=1#L121