Repository navigation
Publish the apple-app-site-association file for the iPhone app - #77
Merged
Merged
Conversation
The native iPhone app needs this file to use passkeys made on app.ftw.energy. It also lets a pairing code scanned with the camera open the app when it is installed; without the app, /p still opens the web app as before. Apple accepts the file only as JSON. The path has no extension, so _headers sets the type. A test holds the app ID, the /p path and the header together. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
ftw-webapp | b8dcec1 | Commit Preview URL Branch Preview URL |
Oct 12 2026, 02:26 PM |
This was referenced Oct 12, 2026
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.
Problem
The native iPhone app (srcfl/ftw-app, M1) cannot use passkeys made on
app.ftw.energyuntil the domain names the app. Todayhttps://app.ftw.energy/.well-known/apple-app-site-associationreturns 404. Without the file, one passkey cannot open the same home on the web and in the app.Change
public/.well-known/apple-app-site-associationlistsL66M368PZ6.energy.ftw.appunder:webcredentials, for passkeys;applinks, for the path/ponly. A pairing code scanned with the iPhone camera opens the app when it is installed. Without the app,/popens the web app as before (_redirectsis unchanged).public/_headersserves the file asapplication/json. Apple accepts nothing else, and the path has no extension. Headers in_headersoverride the default type (Workers static assets: headers).tests/apple-app-site-association.test.tsholds the app ID, the/ppath and the header together. It also checks that_redirectsstill serves/p.Evidence
npm run verify: 105 test files passed, 1 skipped; 1061 tests passed, 1 skipped; the build passed.dist/.well-known/apple-app-site-association, anddist/_headerscarries the rule.curl -sI https://app.ftw.energy/.well-known/apple-app-site-associationshows200andcontent-type: application/json. Then check that Apple's CDN serves the file athttps://app-site-association.cdn-apple.com/a/v1/app.ftw.energy.Paired work
The app side is in srcfl/ftw-app (the M1 foundation PR, which replaces srcfl/ftw-app#5). It adds the Associated Domains entitlement
webcredentials:app.ftw.energyandapplinks:app.ftw.energy, and it pairs from an incoming/p#…link. This PR is harmless without that one; it can merge first.Manual step for Fredrik
Register the App ID
energy.ftw.appwith the Associated Domains capability under teamL66M368PZ6. Signing in to Xcode with automatic signing does this, or you can use the developer portal.The commit has no DCO sign-off. Fredrik signs off his own work.
🤖 Generated with Claude Code