简体   繁体   English

我已经在服务器上上传了apple-app-site-association,用于后端服务

[英]I have uploaded apple-app-site-association on my server, which I use for backend services

Where can I upload 'apple-app-site-association' for universal link setup in my iOS app?. 我可以在哪里上传“ apple-app-site-association”以在我的iOS应用中进行通用链接设置?

How can I use universal link in my iOS app?. 如何在我的iOS应用中使用通用链接? I am getting just confuse to read a lot of tutorials. 我变得很困惑,无法阅读很多教程。 Can anyone help me? 谁能帮我?

You need to upload apple-app-site-association file to the root directory of the server(from where you need to redirect to your installed app). 您需要将apple-app-site-association文件上传到服务器的根目录(需要从该目录重定向到已安装的应用程序)。

eg- Suppose you have to redirect from www.abc.com/getapp then you need to upload the apple-app-site-association file to the root directory where the www.abc.com is get hosted. 例如,假设您必须从www.abc.com/getapp重定向,那么您需要将apple-app-site-association文件上载到承载www.abc.com的根目录中。

Steps to support universal links- 支持通用链接的步骤-

  1. Create your apple-app-site-association file(Suppose your universal link is www.abc.com/getapp and you want to redirect in your app from here). 创建您的apple-app-site-association文件(假设您的通用链接为www.abc.com/getapp,并且您想从此处重定向应用程序)。

     { "applinks": { "apps": [], "details": [ { "appID": "9JA89QQLNQ.com.apple.wwdc", //9JA89QQLNQ is your team ID & com.apple.wwdc is your bundle id "paths": [ "/getapp"] } ] } } 
  2. Upload this file to the root directory where www.abc.com is hosted. 将此文件上传到托管www.abc.com的根目录。

  3. Validate at http://branch.io/resources/aasa-validator/ . http://branch.io/resources/aasa-validator/处进行验证。 If the file is valid then all checks would be green. 如果文件有效,则所有检查都将变为绿色。
  4. Now prepare your app to support universal links- 现在准备您的应用程序以支持通用链接-

    a. 一种。 Go to developer.apple.com and enable Associated Domains to your app ID. 转到developer.apple.com并为您的应用程序ID启用关联域。

    b. Select your target and turn on Associated Domains switch. 选择目标,然后打开“关联域”开关。

    c. C。 Add applinks:abc.com . 添加applinks:abc.com 在此处输入图片说明

    d. d。 Add application:continueUserActivity:restorationHandler: app delegate method so that your app can receive a link and handle it appropriately. 添加application:continueUserActivity:restorationHandler:应用程序委托方法,以便您的应用程序可以接收链接并适当地处理它。

Not getting callback to the app- 没有回调到应用程序-

1.When a user is browsing your website in Safari and they tap a universal link to a URL in the same domain as the current webpage, iOS respects the user's most likely intent and opens the link in Safari. 1.当用户在Safari中浏览您的网站时,他们点击指向当前网页所在域中URL的通用链接,iOS会尊重用户最有可能的意图并在Safari中打开该链接。 在此处输入图片说明

2.Copy and paste your universal link( http(s)://www.abc.com/getapp ) to notes and tap on it. 2.将您的通用链接( http(s)://www.abc.com/getapp )复制并粘贴到笔记上,然后点击它。 It your app can handle this link you will get the option Open in "AppName" . 如果您的应用程序可以处理此链接,您将获得“ Open in "AppName"选项。

References- 引用-

  1. https://gist.github.com/anhar/6d50c023f442fb2437e1 https://gist.github.com/anhar/6d50c023f442fb2437e1
  2. https://developer.apple.com/library/content/documentation/General/Conceptual/AppSearch/UniversalLinks.html https://developer.apple.com/library/content/documentation/General/Conceptual/AppSearch/UniversalLinks.html

Hope it may help. 希望对您有所帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何使用与组件参数完全匹配的 apple-app-site-association 文件? - How do I use the apple-app-site-association file with a component parameter exact match? Apple-app-site-association:横幅显示,而服务器中没有文件 - Apple-app-site-association : banner displays while no file in server 配置 apple-app-site-association 文件并上传到服务器 - Configure apple-app-site-association file and upload on server iOS apple-app-site-association - 它需要脱离我的服务器的根目录吗? - iOS apple-app-site-association - does it need to be off the root of my server? apple-app-site-association文件的位置 - Location for apple-app-site-association file 我向apple-app-site-association文件添加了新路径,但仍然无法正常工作 - I added a new path to apple-app-site-association file but still doesn't work 在浏览器中解密apple-app-site-association - Decrypt apple-app-site-association in browser apple-app-site-association实现安全吗? - Is the apple-app-site-association implementation safe? "Apple-app-site-association 文件中的 webcredentials 是否需要 TeamID 前缀?" - Do I need TeamID Prefix for webcredentials in the apple-app-site-association file? 苹果应用程序站点关联路径验证 - apple-app-site-association paths validation
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM