Providing an apple-app-site-association

To support deep linking and app-links on the web apple expects to find an apple-app-site-association file in root or in .well-known. Details on Apple’s site.

We are using the hosted version of Discourse. How can we provide a static file for iOS to find?

2 个赞

Can you describe your use case more clearly? I don’t understand what you are trying to do here. Can you provide specific examples?

1 个赞

Sure. We have an app that we want to integrate our Discourse community into. When a visitor clicks on a link to that community from Safari (or any other app for that matter) we would like it to open our app and navigate to that link. Apple provides support for associating a domain with an app but it requires publishing a configuration file from that same domain - the apple-app-site-association file. Since the site is hosted by y’all I can’t just shove the static file up on the server…at least I don’t think I can.

2 个赞

AFAIK you can’t use universal links just to open the same webview within another app. If the app isn’t connecting to a back end and rendering out data in a way which enhances the view (think YouTube app over YouTube web UI) it will fail the review process.

Thanks for the insight Stephen. In our case the app will do more than just host the community. We will be integrating the community into a lot of the experience and we’d like to keep it all in within the same app experience.

Sure, I get that, but if you aren’t doing anything to the content which the browser can’t I don’t think you’re going to get approval

This is done, there are now two new site settings: app association android and app association ios. The contents for each setting will be served at /.well-known/assetlinks.json and /apple-app-site-association, respectively.

8 个赞

This is great. Thanks so much!

1 个赞

Yes, it is great. It clears my doubt. I checked the apple-app-site-association.

您好,目前还在运行吗?我使用的是 expo,文档中提到将 apple-app-site-association 放在 ./well-known 路径下。在 apple 开发文档中也有提及。

我已经添加了我的 ASSA 设置。但是,我仍然无法使用此工具验证我的 ASSA。这是我得到的结果:

提前感谢 :face_holding_back_tears:

1 个赞

您是否已将 JSON 添加到 app association ios 站点设置中?我刚在 meta 上进行了测试,运行正常:

请注意,我使用了 https://yurl.chayev.com/ 上的验证器(并且由于这只是一个测试,我已经从这里的设置中删除了 JSON),Branch.io 验证器对我不起作用。

2 个赞

您好,抱歉回复晚了。是的,我在设置中添加了 AASA,但一直无法使其正常工作。我以为这与 AASA 路径有关。之前在此文档中,他们提到我们可以将 AASA 放在根目录或 /.well-known 目录下。

  • apple-app-site-association 文件上传到您的 HTTPS 服务器。您可以将文件放在服务器的根目录或 .well-known 子目录中。

但是,我查看了他们最新的文档,其中没有提到在根目录提供 AASA,只建议在 /.well-known 中提供该文件。

我没有在这方面做更多研究,因为我们转向了另一种方法,使用脚本。希望这对您有帮助。

1 个赞