Carry Meta DAT credentials as build settings, not a personal plist copy - #301
Merged
Merged
Conversation
The credentials reached the build through a gitignored whole-Info.plist copy (INFOPLIST_FILE -> Config/Info/Info.personal.plist). That mechanism failed twice, in opposite directions: - While it was ON, the copy went stale: keys added to OpenGlasses/Info.plist after the snapshot never reached archives, which failed App Store validation with ITMS-90683 (missing NSLocationAlwaysAndWhenInUseUsageDescription). - 71333ea fixed that by dropping the override — and silently took the Meta credentials with it, since the personal plist was the only thing carrying them. MetaAppID fell back to the committed YOUR_META_APP_ID placeholder. The second failure is near-invisible. A placeholder app id doesn't error: it stalls DAT registration below state 3, and the camera permission prompt is gated behind that state, so the symptom is a Connect button that appears to do nothing and a permission dialog that never fires. Existing installs kept working on their cached registration, so it only surfaced weeks later on the next first-time setup. Substitute the two values into the committed plist instead, the way TeamID already uses $(DEVELOPMENT_TEAM): MetaAppID = $(MWDAT_META_APP_ID) ClientToken = AR|$(MWDAT_META_APP_ID)|$(MWDAT_CLIENT_TOKEN_HASH) project.base.yml holds the placeholders (so a clone still builds, and the launch-time check still recognises them); real values live only in gitignored project.local.yml. One source of truth for every other plist key, so staleness is structurally impossible, and no plist copy to swallow secrets again. Close the remaining footguns: - setup-local-dev.sh rewrites project.local.yml wholesale, which would have destroyed the credentials on the next run — the same regression relocated. It now reads the existing values back and preserves them, reporting which path it took. Verified by round-tripping the real script. - It no longer seeds a personal Info.plist, and the mechanism is deleted: rebranding never needed it either, since PRODUCT_BUNDLE_IDENTIFIER and INFOPLIST_KEY_CFBundleDisplayName are build settings. Make the failure self-diagnosing, since a silent placeholder is what cost the debugging time. MWDATConfigCheck (pure, tested) distinguishes a placeholder from an unexpanded $(...) reference — different fixes — and names the fix rather than the fault. It runs at launch and, more usefully, pre-empts the connect-failure message: a bad build config and a missed Meta AI link-back produce an identical stalled state, and the old text sent the user chasing associated-domains for a problem they didn't have. Verified: built plist carries the real credentials and all four previously dropped usage-description keys; a build with project.local.yml removed falls back to the placeholders; full suite green (2788 tests, 0 failures). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
straff2002
force-pushed
the
claude/mwdat-credentials-as-build-settings
branch
from
August 7, 2026 23:49
2ff38f8 to
64afa42
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The bug
The Meta DAT credentials reached the build through a gitignored whole-
Info.plistcopy (INFOPLIST_FILE→Config/Info/Info.personal.plist). That mechanism failed twice, in opposite directions:OpenGlasses/Info.plistafter the snapshot never reached archives — App Store validation failed with ITMS-90683 (missingNSLocationAlwaysAndWhenInUseUsageDescription).71333eafixed that by dropping the override — and silently took the credentials with it, since the personal plist was the only thing carrying them.MetaAppIDfell back to the committedYOUR_META_APP_ID.The second failure is near-invisible. A placeholder app ID doesn't error: it stalls DAT registration below state 3, and the camera permission prompt is gated behind that state. The symptom is a Connect button that appears to do nothing and a permission dialog that never fires. Existing installs kept working on their cached registration, so it only surfaced weeks later on the next first-time setup.
The fix
Substitute the values into the committed plist, the way
TeamIDalready uses$(DEVELOPMENT_TEAM):project.base.ymlholds the placeholders (a clone still builds, and the launch-time check still recognises them); real values live only in gitignoredproject.local.yml. One source of truth for every other plist key, so staleness is structurally impossible — and there's no plist copy left to swallow secrets again.Remaining footguns closed
setup-local-dev.shrewritesproject.local.ymlwholesale, which would have destroyed the credentials on the next run — the same regression relocated. It now reads existing values back and preserves them, reporting which path it took. Verified by round-tripping the real script.PRODUCT_BUNDLE_IDENTIFIERandINFOPLIST_KEY_CFBundleDisplayNameare build settings.Self-diagnosing failure
A silent placeholder is what cost the debugging time, so
MWDATConfigCheck(pure, 9 tests) now distinguishes a placeholder from an unexpanded$(…)reference — different fixes — and names the fix rather than the fault. It runs at launch and, more usefully, pre-empts the connect-failure message: a bad build config and a missed Meta AI link-back produce an identical stalled state, and the old text sent the user chasingassociated-domainsfor a problem they didn't have.Verification
project.local.ymlremoved falls back to the placeholders, so contributors are unaffected.index.htmlis pre-existing and public by design; the client token hash appears nowhere).🤖 Generated with Claude Code