Skip to content

build: add Local.xcconfig override for per-developer signing#1037

Closed
datlechin wants to merge 1 commit intomainfrom
refactor/xcconfig-team-overrides
Closed

build: add Local.xcconfig override for per-developer signing#1037
datlechin wants to merge 1 commit intomainfrom
refactor/xcconfig-team-overrides

Conversation

@datlechin
Copy link
Copy Markdown
Member

Closes #1033.

Summary

Move per-developer signing values out of project.pbxproj and into a gitignored Local.xcconfig. Removes the git update-index --skip-worktree TablePro.xcodeproj/project.pbxproj workaround documented after #1028. Standard Apple xcconfig pattern (project-level base configuration + optional include of a developer-local file).

What this PR delivers (committed files only)

  • Configurations/Shared.xcconfig: project-level defaults for DEVELOPMENT_TEAM, PRODUCT_BUNDLE_IDENTIFIER, CODE_SIGN_ENTITLEMENTS. Final line is #include? "../Local.xcconfig" (Apple's documented optional-include syntax).
  • Local.xcconfig.example: copy-and-edit template, three commented overrides.
  • .gitignore: ignores Local.xcconfig.
  • CONTRIBUTING.md: rewrites the personal-team section to a cp + edit + build flow. No more pbxproj skip-worktree hack.

What you (maintainer) need to do in Xcode before merging

The override only takes effect after the project file is rewired. xcconfig values cannot override target-level Build Settings; the existing target-level entries must be removed so they fall back to the xcconfig.

  1. Wire Configurations/Shared.xcconfig at the project level:

    • Project Editor (top of file list) → select the TablePro project (not a target) → Info tab → Configurations section.
    • For both Debug and Release, set "Based on Configuration File" → Configurations/Shared.
  2. Remove redundant target-level overrides (so the xcconfig flows through):

    • TablePro app target → Build Settings → for both Debug and Release configs, delete:
      • DEVELOPMENT_TEAM (currently D7HJ5TFYCU)
      • PRODUCT_BUNDLE_IDENTIFIER (currently com.TablePro)
      • CODE_SIGN_ENTITLEMENTS (currently TablePro/TablePro.entitlements)
    • mcp-server target → Build Settings → delete DEVELOPMENT_TEAM (both configs).
    • Do not touch plugin targets (MySQLDriver, PostgreSQLDriver, etc.). They have unique bundle IDs (com.TablePro.MySQLDriver etc.) that must stay per-target. Their DEVELOPMENT_TEAM = "" already inherits from the project.
  3. Verify:

    • Build TablePro Debug under the official D7HJ5TFYCU team. Should produce a binary signed exactly as before (no Local.xcconfig present, defaults from Shared.xcconfig apply).
    • codesign -d --entitlements - build/Debug/TablePro.app should still show D7HJ5TFYCU.com.TablePro.shared as the keychain access group.

The pbxproj diff from these changes is small (~16 deleted lines, ~4 baseConfigurationReference additions). Worth a careful diff review before committing.

Why this is the canonical Apple pattern

  • #include? (with ?) is documented Xcode syntax for optional includes. Used in Apple's own sample code (Backyard Birds, Food Truck).
  • Project-level base configuration with target-level pbxproj overrides removed is exactly how Apple structures sample projects when per-developer overrides are needed.
  • No comments-as-instructions, no --skip-worktree, no shadow files. Just the standard build settings inheritance chain: SDK defaults → project xcconfig (Shared) → optional Local.xcconfig override → target build settings (left untouched for plugins).

Caveats

  • Free personal teams still hit Apple's 10-bundle-IDs-per-7-days limit because the project signs around a dozen plugin bundles. Documented in CONTRIBUTING.md. xcconfig can't fix that.
  • Existing contributors who ran git update-index --skip-worktree TablePro.xcodeproj/project.pbxproj should undo with git update-index --no-skip-worktree TablePro.xcodeproj/project.pbxproj before pulling this branch.

CHANGELOG

Not updated: this is a build/contributor-tooling change, not a runtime feature. The previous PR #1028 (which this supersedes for the personal-team flow) is still in [Unreleased]. Happy to add a Changed entry if you want one.

Test plan

  • swiftlint lint --strict: no Swift changes.
  • Banned-word check on diff: clean.
  • After Xcode wiring: Release build under official team produces identical signing (codesign -d --entitlements - matches main).
  • After Xcode wiring: contributor flow tested with cp Local.xcconfig.example Local.xcconfig → set DEVELOPMENT_TEAM → build succeeds.

@chatgpt-codex-connector
Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@datlechin datlechin closed this May 6, 2026
@datlechin datlechin deleted the refactor/xcconfig-team-overrides branch May 6, 2026 16:33
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.

Move per-contributor team override from pbxproj to a gitignored xcconfig

1 participant