Skip to content

Publish the apple-app-site-association file for the iPhone app - #77

Merged
frahlg merged 1 commit into
mainfrom
feat/apple-app-site-association
Oct 12, 2026
Merged

frahlg merged 1 commit into
mainfrom
feat/apple-app-site-association

Conversation

@frahlg

@frahlg frahlg commented Oct 12, 2026

Copy link
Copy Markdown
Member

Problem

The native iPhone app (srcfl/ftw-app, M1) cannot use passkeys made on app.ftw.energy until the domain names the app. Today https://app.ftw.energy/.well-known/apple-app-site-association returns 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-association lists L66M368PZ6.energy.ftw.app under:
    • webcredentials, for passkeys;
    • applinks, for the path /p only. A pairing code scanned with the iPhone camera opens the app when it is installed. Without the app, /p opens the web app as before (_redirects is unchanged).
  • public/_headers serves the file as application/json. Apple accepts nothing else, and the path has no extension. Headers in _headers override the default type (Workers static assets: headers).
  • tests/apple-app-site-association.test.ts holds the app ID, the /p path and the header together. It also checks that _redirects still serves /p.

Evidence

  • npm run verify: 105 test files passed, 1 skipped; 1061 tests passed, 1 skipped; the build passed.
  • The build output contains dist/.well-known/apple-app-site-association, and dist/_headers carries the rule.
  • Not checked yet: the deployed response. After the deploy, check that curl -sI https://app.ftw.energy/.well-known/apple-app-site-association shows 200 and content-type: application/json. Then check that Apple's CDN serves the file at https://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.energy and applinks: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.app with the Associated Domains capability under team L66M368PZ6. 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

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>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-12T14:28:42.575057Z b8dcec1 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

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

@frahlg
frahlg merged commit af5e961 into main Oct 12, 2026
3 checks passed
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