Skip to content

chore: stop tracking GoogleService-Info.plist#26

Merged
Ivan-LB merged 1 commit into
devfrom
chore/stop-tracking-firebase-config
Apr 25, 2026
Merged

chore: stop tracking GoogleService-Info.plist#26
Ivan-LB merged 1 commit into
devfrom
chore/stop-tracking-firebase-config

Conversation

@Ivan-LB
Copy link
Copy Markdown
Owner

@Ivan-LB Ivan-LB commented Apr 25, 2026

Summary

  • Removes Savely/GoogleService-Info.plist from the git index (file remains on disk).
  • Extends the CI placeholder step to also generate GoogleService-Info.plist alongside Config.plist so the build still finds its required input.
  • Updates the matching gotcha entry to cover both plists.

Why

The file was tracked since 2024-11-13 despite CLAUDE.md claiming it was gitignored. The .gitignore rule added in #22 now actually applies. While the repo is private, this is hygiene — Firebase iOS API keys are not true secrets (they ship in every App Store binary; protection comes from Firestore Security Rules and App Check). Past commits still contain the file, which is fine for now. If the repo ever goes public, scrub history with git-filter-repo and ensure App Check is enforced before flipping visibility.

Test plan

  • CI workflow passes on this PR — first validation that the GoogleService-Info.plist placeholder satisfies xcodebuild's input requirement.
  • Locally: ls -la Savely/GoogleService-Info.plist confirms the file is still on disk after the merge.
  • Locally: Xcode project builds and the app reads Firebase config as before (no behavior change).

Risks

  • If a unit test triggers FirebaseApp.configure() with the placeholder, Firebase will fail to authenticate the bogus credentials. Today, only the AppDelegate calls configure(), and the AppDelegate only runs when the app launches — which CI never does (UI tests are skipped). If unit tests later import code that touches Firebase at module load time, this would surface as a test failure and we'd switch to a real config from a GitHub secret.
  • The plist remains in repo history. Acceptable for a private repo. Documented in the commit body.

Checklist

  • Branch named with approved prefix (chore/)
  • Conventional Commits
  • No real secrets committed (placeholder values only)
  • Targets dev

🤖 Generated with Claude Code

The file was committed once on 2024-11-13 and has lived in the index ever
since, despite CLAUDE.md claiming it was gitignored. It now matches the
state of Config.plist: gitignored locally, generated as a placeholder in
CI.

The plist is not strictly a secret (Firebase iOS API keys are public —
they ship in every App Store binary, and protection comes from Firestore
Security Rules and App Check, not key secrecy). But while the repo is
private, hygiene-removing it stops env-specific config from drifting in
under the radar.

Three changes:

- git rm --cached Savely/GoogleService-Info.plist
    File stays on disk locally so Xcode still reads it. .gitignore rule
    (added in #22) now actually applies. Past commits still contain the
    file — acceptable while the repo is private. If the repo ever goes
    public, scrub history with git-filter-repo and rotate via App Check.

- .github/workflows/ci.yml
    Renamed "Generate placeholder Config.plist" to "Generate placeholder
    secrets" and added a structurally-valid GoogleService-Info.plist
    alongside it. CI never calls FirebaseApp.configure() (it runs from
    AppDelegate at app launch, and SavelyUITests is skipped), so a
    placeholder with the right shape is sufficient. BUNDLE_ID matches
    the app's PRODUCT_BUNDLE_IDENTIFIER so Firebase's parser would
    accept it if it ever did run.

- .claude/knowledge/gotchas.yaml
    Renamed the gotcha entry to ci-needs-placeholder-secrets and updated
    the rationale to cover both plists.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@Ivan-LB Ivan-LB merged commit a0b4e25 into dev Apr 25, 2026
1 check passed
@Ivan-LB Ivan-LB deleted the chore/stop-tracking-firebase-config branch April 25, 2026 09:03
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