Skip to content

fix(mobile): add Expo app config for iOS associatedDomains and exampl… - #584

Open
Davoski1 wants to merge 1 commit into
Miracle656:mainfrom
Davoski1:fix/ios-associated-domains
Open

fix(mobile): add Expo app config for iOS associatedDomains and exampl…#584
Davoski1 wants to merge 1 commit into
Miracle656:mainfrom
Davoski1:fix/ios-associated-domains

Conversation

@Davoski1

Copy link
Copy Markdown

Summary

Add iOS associated domains wiring for passkeys and example .well-known payloads for domain association.

Changes

  • Add frontend/mobile/app.config.js
    • Dynamic Expo config that injects ios.associatedDomains from EXPO_PUBLIC_PASSKEY_RP_ID (e.g. veil.app or your-domain.com) so the generated iOS build includes webcredentials:<rp-id>.
  • Add examples in examples/expo/.well-known/:
    • apple-app-site-association.json — example iOS webcredentials payload for hosting at https://<your-domain>/.well-known/apple-app-site-association.
    • assetlinks.json — example Android Digital Asset Links payload for hosting at https://<your-domain>/.well-known/assetlinks.json.

Why

Mobile passkeys on iOS require the native app entitlement associatedDomains with an entry of the form webcredentials:<rp-id>. This change enables builds to pick the relying-party id from the environment (so secrets/hostnames aren't baked into source) and provides example .well-known payloads that must be hosted on the web origin to complete the platform association.

Notes for maintainers / operators

  • Set EXPO_PUBLIC_PASSKEY_RP_ID (e.g. veil.app or your-domain.com) in your CI/EAS or local environment before building iOS artifacts so the entitlement is injected.
  • Host apple-app-site-association at https://<domain>/.well-known/apple-app-site-association (the URL typically omits the .json suffix). Serve it over HTTPS with application/json content-type.
  • Replace placeholders in the example files:
    • iOS: <TEAM_ID>.<BUNDLE_ID>
    • Android: <your.package.name> and <SHA256> fingerprint(s)

Testing / Verification

  1. Build an iOS app with EXPO_PUBLIC_PASSKEY_RP_ID set and verify associatedDomains contains webcredentials:<rp-id> in the generated entitlements.
  2. Host apple-app-site-association on the domain and confirm iOS recognizes the association (device logs / Apple verification tools).
  3. Verify passkey flows between the domain and the iOS app (registering and using a passkey).

Closes #446

@Davoski1
Davoski1 requested a review from Miracle656 as a code owner July 29, 2026 16:35
@vercel

vercel Bot commented Jul 29, 2026

Copy link
Copy Markdown

@rhoggs-bot-test-account is attempting to deploy a commit to the miracle656's projects Team on Vercel.

A member of the Team first needs to authorize it.

@drips-wave

drips-wave Bot commented Jul 29, 2026

Copy link
Copy Markdown

@Davoski1 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@Miracle656

Copy link
Copy Markdown
Owner

Thanks for this! It needs a rebase before it can land. Since this branch was opened, the mobile config moved from app.json to app.config.ts, which already sets ios.associatedDomains and android.package (bundle id xyz.veil.wallet). Adding app.config.js here would give Expo two config files.

Could you rebase onto main and fold any still-missing associatedDomains/asset-link changes into the existing app.config.ts (drop the new app.config.js)? Then I'll re-review.

@Miracle656

Copy link
Copy Markdown
Owner

Thanks @Davoski1 — reviewed. Superseded: main migrated to app.config.ts (#508), which already wires iOS associatedDomains (applinks: + webcredentials: for app.veil.xyz). The app.config.js added here can't coexist with the existing app.config.ts (Expo picks one). Recommend closing. The .well-known example files are fine, but main already ships real ones under frontend/wallet/public/.well-known/.

@Miracle656

Copy link
Copy Markdown
Owner

Apologies — this sat unreviewed for a month while main moved underneath it, and that is on us, not you.

What happened: PR #508 (3a9e337, "register veil:// scheme and universal/app links") landed after you opened this. It did the same job from the other direction:

  • Added associatedDomains to frontend/mobile/app.config.ts (line 56)
  • Added Android intentFilters with the assetlinks reference (lines 70–80)
  • Set bundleIdentifier, package and scheme
  • Deleted frontend/mobile/app.json

And the domain-association files are now hosted for real, not as examples:

frontend/wallet/public/.well-known/assetlinks.json
frontend/wallet/public/.well-known/apple-app-site-association

So the gap you were closing is closed. I have checked main rather than assuming.

Specific to this PR: adding frontend/mobile/app.config.js would now sit alongside the existing app.config.ts. Expo cannot have both — it is ambiguous at best and silently ignores one at worst. And the examples/expo/.well-known/* payloads are superseded by the real ones above.

I am not closing this. Your call whether to close it, and genuinely sorry the delay made the work moot. If you want something in this area that is still open, #672 is live: /multisig is reachable but unlinked and its WASM hash is not network-aware.

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.

18. iOS Associated Domains

2 participants