简体   繁体   English

如何为 iOS 通用链接和 Android 资产链接设置 Angular 项目以在本机移动应用程序中打开链接

[英]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.

相关问题 Angular Universal Links (Android / IOS) Asset Linking and apple-app-site-association - Angular Universal Links (Android / IOS) Asset Linking and apple-app-site-association 如何使用各自的本机应用程序打开移动网站的链接 - How to open links from a mobile website using the respective native app Webview-在外部应用程序和浏览器/ Android中打开链接 - Webview - open links in external apps and browsers / android 如何在 Android 工作室的相关应用程序中打开社交媒体链接? - How to open Social media links in related apps from Android studio? 如何编写移动链接,以使它们在存在Android和iOS的应用程序中打开,但如果应用程序不存在,则使用http链接? - How to write mobile links so they open in an app on Android and iOS if that app exists, but use http link if app does not? 适用于iOS和Android的Yammer URL移动深层链接 - Yammer URL Mobile Deep Links for iOS and Android React Native webview无法在android上打开链接 - React native webview can not open links on android iOS自定义URL方案与Universal Links和Android对应方案 - iOS custom URL schemes vs. Universal Links and Android counterpart 如何打开外部链接到android中的相关应用程序 - how to open external links in to there relevant app in android Android如何在服务器端验证与Digital Asset Links的深度链接 - How does Android verifies deep links with Digital Asset Links at server side
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM