[英]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?有谁知道我应该如何设置我的 Angular 项目以使用本机移动应用程序链接?
Eg例如
iOS: Universal Links: https://developer.apple.com/library/archive/documentation/General/Conceptual/AppSearch/UniversalLinks.html iOS:通用链接: 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 Android:数字资产链接: https : //developers.google.com/digital-asset-links/v1/getting-started
Thanks a bunch!谢谢一堆!
I found out a few things:我发现了一些事情:
1.) I've placed the .well-known folder in the src folder of my angular project. 1.) 我已将.well-known文件夹放在我的 angular 项目的 src 文件夹中。 The .well-known folder contains both the apple-app-site-association file for iOS apps, as well as the assetlinks.json for android apps.
.well-known文件夹包含 iOS 应用程序的apple-app-site-association文件,以及 android 应用程序的assetlinks.json 。
2.) In the .angular-cli.json configuration, I've added the .well-known folder to the apps->assets configuration. 2.) 在.angular-cli.json配置中,我已将.well -known文件夹添加到apps- >assets配置中。
3.) For the deployment in the nginx.conf file, I've added: 3.) 对于nginx.conf文件中的部署,我添加了:
# Used to open links in the native PEAX iOS app, if available
location = /.well-known/apple-app-site-association { }
# Used to open links in the native PEAX Android app, if available
location = /.well-known/assetlinks.json { }
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.