Hello everyone,
Feedback Reporter Bug ID #: FB9641953
We are using a single codebase with a hierarchical .xcconfig structure to use our CI to build different app versions and flavours so to speak. We have noticed what we think is a regression from Xcode 12.5.1 to Xcode 13. Essentially, after updating to Xcode 13, xcodebuild (not Xcode IDE) is unable to find .xcconfig files we are including from an existing .xcconfig file anymore:
Location of file: folderWhereTheXcodeProjectIsLocated/Configurations/Project/Local/development-ventures/venture/local-venture-development-env.xcconfig
From this file we try to include another .xcconfig file: #include "Configurations/Project/Ventures/venture/EnvironmentBuilds/debug-env.xcconfig"
On Xcode 12.5.1, using xcodebuild to build the app from the command line, this works. On Xcode 13 this does not work anymore if I use xcodebuild to build the project from the Terminal giving the following error: "could not find included file 'Configurations/Project/Ventures/venture/EnvironmentBuilds/debug-env.xcconfig' in search paths"
The attached project does reproduce this issue. I hope it can be useful.
Sample project available at (zipped): https://www.icloud.com/iclouddrive/0WEoc6m4EscDQZhJKvj-kiqJw#testXcconfig
You can build it from the Command-line as follows (from the folder where the Xcode project is):
/usr/bin/xcrun xcodebuild -UseNewBuildSystem=YES -xcconfig InnerXcconfig/innerInner/tt.xcconfig
Output:
Command line invocation:
/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -UseNewBuildSystem=YES -xcconfig InnerXcconfig/innerInner/tt.xcconfig
User defaults from command line:
IDEPackageSupportUseBuiltinSCM = YES
UseNewBuildSystem = YES
Build settings from configuration file 'InnerXcconfig/innerInner/tt.xcconfig':
a = "AA"
note: Using new build system
note: Planning
Analyze workspace
Create build description
Build description signature: b647425e15121588771b659eeaafeccd
Build description path: /Users/username/GitHub/NPS/Tests/testXcconfig/build/XCBuildData/b647425e15121588771b659eeaafeccd-desc.xcbuild
note: Build preparation complete
note: Building targets in parallel
/Users/username/GitHub/NPS/Tests/testXcconfig/InnerXcconfig/innerInner/tt.xcconfig:1:1: error: could not find included file 'InnerXcconfig/innerInnerB/t.xcconfig' in search paths
/Users/username/GitHub/NPS/Tests/testXcconfig/InnerXcconfig/innerInner/tt.xcconfig:1:1: error: could not find included file 'InnerXcconfig/innerInnerB/t.xcconfig' in search paths
/Users/username/GitHub/NPS/Tests/testXcconfig/InnerXcconfig/innerInner/tt.xcconfig:1:1: error: could not find included file 'InnerXcconfig/innerInnerB/t.xcconfig' in search paths
/Users/username/GitHub/NPS/Tests/testXcconfig/InnerXcconfig/innerInner/tt.xcconfig:1:1: error: could not find included file 'InnerXcconfig/innerInnerB/t.xcconfig' in search paths
/Users/username/GitHub/NPS/Tests/testXcconfig/InnerXcconfig/innerInner/tt.xcconfig:1:1: error: could not find included file 'InnerXcconfig/innerInnerB/t.xcconfig' in search paths
/Users/username/GitHub/NPS/Tests/testXcconfig/InnerXcconfig/innerInner/tt.xcconfig:1:1: error: could not find included file 'InnerXcconfig/innerInnerB/t.xcconfig' in search paths
/Users/username/GitHub/NPS/Tests/testXcconfig/InnerXcconfig/innerInner/tt.xcconfig:1:1: error: could not find included file 'InnerXcconfig/innerInnerB/t.xcconfig' in search paths
/Users/username/GitHub/NPS/Tests/testXcconfig/InnerXcconfig/innerInner/tt.xcconfig:1:1: error: could not find included file 'InnerXcconfig/innerInnerB/t.xcconfig' in search paths
/Users/username/GitHub/NPS/Tests/testXcconfig/InnerXcconfig/innerInner/tt.xcconfig:1:1: error: could not find included file 'InnerXcconfig/innerInnerB/t.xcconfig' in search paths
** BUILD FAILED **
Kind Regards