Can someone shed some light on how to setup iOs app link to work for angular ?
Basically I want to have a link in mail sent to users that then opens the app if it is installed.
I have in the src/.well-known folder added a file called ‘apple-app-site-association’ with no extension.
When running locally it correctly downloads the file when i go to localhost:4200/.well-known/apple-app-site-association
I have also in the angular.json added "src/.well-known" to the assets.
The web app is deployed to azure static web app, and here when I access the site https://APPNAME.com/./well-known/apple-app-site-association it does not work.
I have also checked apples own tool. https://app-site-association.cdn-apple.com/a/v1/PAGE.com
from reading all over related issues it seems that angular sees /apple-app-site-association as a route and not a .json file and I need to add a MIME type to this?
How do I make the browser understand that this is a file and not a route? do I have to change this in angular somewhere, or do I have to do something in azure static web app?
2
Answers
Thanks to Sampath I found a solution.
If anyone else wants the answer specifically for azure static web app here goes:
With the inspiration from this post I added the apple-app-site-association.json with extenstion to the path so it looks like this: ./well-known/apple-app-site-association.json
Then I created a file staticwebapp.config.json in the root folder of the angular project containing:
Update angular.json to add the config file to the assets array.
The routing configuration for Azure Static Web Apps should be added to staticwebapp.config.json in the main path, using this DOC.
about.component.ts:
about.component.html:
Local:
staticwebapp.config.json:
Deployment status in Git Action:
Azure: