Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set up an Angular project for iOS universal links and Android asset links to open links in the native mobile apps

Does anyone know how I should set up my Angular project to use native mobile app linkage?

E.g.

iOS: Universal Links: https://developer.apple.com/library/archive/documentation/General/Conceptual/AppSearch/UniversalLinks.html

Android: Digital Asset Links: https://developers.google.com/digital-asset-links/v1/getting-started

Thanks a bunch!

like image 892
Carli Beeli Avatar asked Oct 11 '18 14:10

Carli Beeli


1 Answers

I found out a few things:

1.) I've placed the .well-known folder in the src folder of my angular project. The .well-known folder contains both the apple-app-site-association file for iOS apps, as well as the assetlinks.json for android apps.

2.) In the .angular-cli.json configuration, I've added the .well-known folder to the apps->assets configuration.

3.) For the deployment in the nginx.conf file, I've added:

# Used to open links in the native iOS app, if available
location = /.well-known/apple-app-site-association { }

# Used to open links in the native Android app, if available
location = /.well-known/assetlinks.json { }
like image 129
Carli Beeli Avatar answered Nov 16 '22 15:11

Carli Beeli