Skip to content

[Xcode 16] pod install mistakenly sets baseConfigurationReference key-value with custom xcconfig in a folder #12806

Open
@Kota1021

Description

@Kota1021

Problem

CocoaPods/Xcodeproj#985 added support for Xcode 16's folder (new file system synchronized groups)

When I convert xcconfigs group which has App.debug.xcconfig into a folder, the related diff would be like this:

                D95B3A471F823EDA005F1F58 /* Debug */ = {
                        isa = XCBuildConfiguration;
-                       baseConfigurationReference = D9BCA5E41FD034D80016CEE2 /* App.debug.xcconfig */;
+                       baseConfigurationReferenceAnchor = 350FEC862DC066CB00D526AF /* xcconfigs */;
+                       baseConfigurationReferenceRelativePath = App.debug.xcconfig;
                        buildSettings = {
                                ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;

with this diff, i can still successfully build without any problem.

Then, if i run pod install, it automatically adds baseConfigurationReference like below:

		D95B3A471F823EDA005F1F58 /* Debug */ = {
			isa = XCBuildConfiguration;
+			baseConfigurationReference = 0B456502102A390A3C7ACE32 /* Pods-blabla-app-ios.debug.xcconfig */;
			baseConfigurationReferenceAnchor = 350FEC862DC066CB00D526AF /* xcconfigs */;
			baseConfigurationReferenceRelativePath = App.debug.xcconfig;

this behavior prevents me from using Environment Value that was set via my custom xcconfig App.debug.xcconfig in the build phase, resulting in Command PhaseScriptExecution failed with a nonzero exit code


App.debug.xcconfig

#include "../../Pods/Target Support Files/Pods-blabla-app-ios/Pods-blabla-app-ios.debug.xcconfig"
#include "../../xcconfigs/Environment.debug.xcconfig"

Environment.debug.xcconfig

// sets Environment values here

Environment

Xcode 16.2
cocoapods (1.16.2)
xcodeproj (>= 1.27.0, < 2.0)

Ideal Behaviour

I think when baseConfigurationReferenceAnchor and baseConfigurationReferenceRelativePath are set, 'pod install' should not add baseConfigurationReference.

Any opinion is welcome, thank you for looking over this issue ❤

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions