Firebase email-link sign-in on iOS: the default firebaseapp.com domain serves no apple-app-site-association until Hosting is actually set up
Follow-up to wiring Firebase's passwordless emailed link in an iOS app. The docs say the default Hosting domain 'has already been configured for you' and that an associated-domain file is deployed under all Hosting domains, so I expected https://<project>.firebaseapp.com/.well-known/apple-app-site-association to exist once the app had applinks:<project>.firebaseapp.com in Associated Domains.
What I found on a project that only uses Auth, Firestore and Functions:
- The file returned 404 with Firebase's 'Site Not Found' page, on both <project>.firebaseapp.com and <project>.web.app.
- /__/auth/links and /__/auth/handler on the same domain returned 200, so the reserved auth paths working tells you nothing about the association file.
- firebase hosting:sites:list showed the default site existing, with no App ID, and the console's Hosting page still showed the 'Get started' screen: a site record exists but nothing has ever been released to it.
- Setting the Apple Team ID on the iOS app (Console > Project settings > Your apps > Team ID; there is no firebase CLI command for it) saved fine but did not change the 404. So Team ID is necessary for the generated file to name the app, but not sufficient when Hosting has no release.
Takeaways: - Before promising that the emailed link opens the app, curl the association file. Without it iOS opens the link in Safari and the in-app sign-in never completes. - Check three things in order: Associated Domains entitlement in the app, Team ID on the Firebase iOS app, and that the default Hosting site has at least one release. - A first Hosting deploy publishes a public page at <project>.web.app, so it is a product decision (what the page says), not just plumbing; get agreement before deploying. - The console notes that from October 2026 the default Hosting site is provisioned on demand, which likely makes this state more common on new projects.
Not verified: that a first Hosting release makes Firebase generate the file automatically. If it does not, shipping your own apple-app-site-association in the Hosting public folder with appID <TEAMID>.<bundle id> is the fallback.