Skip to content

fix: gitignore xcodeproj and generate on-the-fly via xcodegen#6715

Merged
ashleeradka merged 4 commits into
mainfrom
ashlee/xcodegen-automation
Feb 22, 2026
Merged

fix: gitignore xcodeproj and generate on-the-fly via xcodegen#6715
ashleeradka merged 4 commits into
mainfrom
ashlee/xcodegen-automation

Conversation

@ashleeradka
Copy link
Copy Markdown
Contributor

@ashleeradka ashleeradka commented Feb 22, 2026

Summary

  • Gitignore the iOS xcodeproj and remove it from git tracking — eliminates the entire class of "stale generated file" bugs (like the TwilioSettingsSection build failure after PR feat: macOS QR code pairing + iOS scanner + TLS certificate pinning #6656)
  • Add xcodegen generation to build.sh so the xcodeproj is always regenerated fresh from project.yml before every build
  • Add xcodegen install to CI workflow so builds work without a committed xcodeproj
  • Remove the pre-commit xcodegen hook (no longer needed since nothing is committed)

Test plan

  • cd clients/ios && ./build.sh generates xcodeproj and builds successfully
  • git status shows no xcodeproj changes after build (gitignored)
  • CI installs xcodegen, build.sh generates the project, build passes

🤖 Generated with Claude Code

Regenerate the iOS xcodeproj to include TwilioSettingsSection.swift which
was missing after the QR pairing PR merge. Add two layers of protection
against stale xcodeproj files:

- Pre-commit hook: auto-runs xcodegen when iOS source files are
  added/deleted/renamed or project.yml changes
- CI check: verifies xcodeproj matches xcodegen output before building

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8a68506fcb

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread .github/workflows/ci-ios.yml Outdated
working-directory: clients/ios
run: |
xcodegen
if ! git diff --exit-code vellum-assistant-ios.xcodeproj/project.pbxproj; then
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Validate all generated Xcode project files

The CI “up to date” gate only diffs vellum-assistant-ios.xcodeproj/project.pbxproj, but xcodegen also produces other tracked files (for example xcshareddata/xcschemes/VellumAssistantIOS.xcscheme from the schemes section in clients/ios/project.yml), so scheme-only regeneration drift will pass this check and still land stale generated artifacts. This weakens the safeguard added in this commit because project changes can be merged without the full generated project state committed.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 2d81187 — now staging and diffing the entire vellum-assistant-ios.xcodeproj/ directory instead of just project.pbxproj, so scheme files and workspace data are also covered.

Comment thread .githooks/pre-commit Outdated

# Check for added/deleted/renamed files under iOS source directories
if [ $XCODEGEN_NEEDED -eq 0 ]; then
if git diff --cached --name-only --diff-filter=ADR -z | tr '\0' '\n' | grep -qE '^clients/ios/(App|Views|Resources|Tests)/'; then
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Match rename source paths when triggering XcodeGen

The pre-commit trigger uses git diff --cached --name-only --diff-filter=ADR, and --name-only reports only the destination path for renames; if a file is renamed from clients/ios/Views/... to a path outside the watched directories, this regex no longer matches and the hook skips regeneration even though a source file was removed from a generated target. That leaves project.pbxproj stale until CI catches it instead of auto-fixing locally.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Acknowledged — renames from watched dirs to outside are an edge case, but the CI check now diffs the entire xcodeproj directory (2d81187), so any drift from missed renames will still be caught there.

devin-ai-integration[bot]

This comment was marked as resolved.

ashleeradka and others added 2 commits February 22, 2026 16:01
xcodegen also generates scheme files, workspace data, and other tracked
files inside the xcodeproj. Stage the whole directory in the pre-commit
hook and diff the whole directory in CI to catch all drift.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Instead of committing the generated xcodeproj and automating sync,
eliminate the staleness problem entirely: gitignore the xcodeproj and
have build.sh generate it fresh from project.yml before every build.

- Add clients/ios/vellum-assistant-ios.xcodeproj/ to .gitignore
- Remove xcodeproj from git tracking (4 files)
- Add xcodegen generation step to build.sh (runs before xcodebuild)
- Add xcodegen install to CI workflow (build.sh handles generation)
- Remove pre-commit xcodegen hook (no longer needed)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@ashleeradka ashleeradka changed the title fix: regenerate xcodeproj and add xcodegen automation fix: gitignore xcodeproj and generate on-the-fly via xcodegen Feb 22, 2026
devin-ai-integration[bot]

This comment was marked as resolved.

Move xcodegen generation after the command parsing case statement so
clean and invalid-command paths exit early without requiring xcodegen.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@ashleeradka ashleeradka merged commit 9840edb into main Feb 22, 2026
1 check passed
@ashleeradka ashleeradka deleted the ashlee/xcodegen-automation branch February 22, 2026 21:38
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.

1 participant