a year ago
Project Id: dba6cd6e-5ea1-494c-b77f-81377e24fbde
I am trying to add Apple Site Association file to my SPA but I don't know where. It is single page Expo app and it picks up latest commit from my git repo. So, How do I do this?
For a similar situation, I added a route to my fastapi but I dont know how with expo.
3 Replies
a year ago
To add an Apple Site Association file to your single-page Expo app, you'll need to serve the .well-known directory from your app's root. Since Expo is primarily used for building mobile applications, it doesn’t inherently serve static files like a traditional web server. You'll need to handle this in the deployment phase or within a server-side component if your app includes one.
If you don't have a backend server in your Expo app, you might consider setting up a basic server using Express or FastAPI to serve static files. This server can host the .well-known directory:
If you're familiar with FastAPI, you can also use it to serve the .well-known directory.
Status changed to Awaiting User Response Railway • 11 months ago
a year ago
Hello 
Thanks for the answer.
My SPA has a fastapi backend. It is already serving a .well-known/apple-app-site-association file.
However it's root is under different custom dns.
I have them as a testing custom devstage dns.
I was able to do that with fastapi however, I could not manage to do that with Expo Web yet.
I am using metro bundling using expo-router so the client expo app is not setup to have directories.
I could change the expo publish to static files ( from dist directory ) but it does not fit my development plans.
So the real question is how do I serve a .well-known directory with an SPA?
Is it possible to have a static folder inside my expo SPA repo and have railway package it at deploy time?
Or is it possible to redirect a url address from client side dns to backend fastapi to serve the file?
Status changed to Awaiting Railway Response Railway • 11 months ago
a year ago
Yea, Expo Web would be a different solution. That I can't help with unfortunately.
Status changed to Awaiting User Response Railway • 11 months ago
7 months ago
This thread has been marked as solved automatically due to a lack of recent activity. Please re-open this thread or create a new one if you require further assistance. Thank you!
Status changed to Solved Railway • 7 months ago