Skip to content

Conversation

@lpusok
Copy link
Contributor

@lpusok lpusok commented Sep 1, 2025

Credit to @ThomasDutartre, who found and fixed the issue.

The main issue was in parseBuildSettings() where duplicate keys were being overwritten. In multi-target schemes, xcodebuild -showBuildSettings outputs settings for all targets sequentially:

Build settings for action build and target "MainApp":
    PRODUCT_BUNDLE_IDENTIFIER = com.company.app
    DEVELOPMENT_TEAM = ABC123

Build settings for action build and target "NotificationService":
    PRODUCT_BUNDLE_IDENTIFIER = com.company.app.notifications
    DEVELOPMENT_TEAM = XYZ789

The parser was keeping the last occurrence (last target in scheme build targets list), but we need the first occurrence (first target in scheme build targets list) for correct bundle ID resolution.

@bitrise-ip-bot
Copy link
Contributor

bitrise-ip-bot commented Sep 1, 2025

Summary

This PR fixes a critical bug in build settings parsing for multi-target schemes. The change ensures the first target's settings (main target) are preserved instead of being overwritten by subsequent targets, preventing issues with wrong bundle IDs and development teams.

Walkthrough

File Summary
xcodebuild/show_build_settings.go Fixed parseBuildSettings to preserve first occurrence of duplicate keys in multi-target schemes

@lpusok lpusok merged commit 0c84f25 into v1 Sep 3, 2025
3 checks passed
@lpusok lpusok deleted the SSW-2477-build-settings-override branch September 3, 2025 10:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants