Providing an apple-app-site-association

AI-generated summary

The discussion revolves around enabling Apple’s universal links for Discourse-hosted communities via the apple-app-site-association (AASA) file, which Apple requires to be served from the domain’s root or /.well-known path. phallguy initiates the request, explaining their goal to deep-link from Safari into their native iOS app, integrating Discourse content. codinghorror seeks clarification, while Stephen cautions that Apple may reject apps that merely replicate web content without added value. phallguy clarifies their app enhances the experience beyond the web view. The feature is later implemented by pmusaraj, who adds two site settings: app association android and app association ios, serving files at /.well-known/assetlinks.json and /apple-app-site-association respectively. Users express gratitude phallguy, JamieLanger. However, ell reports verification issues using the Branch.io validator, despite correctly configuring the AASA via the site setting. pmusaraj confirms the setup works using an alternative validator (yurl.chayev.com) and notes Branch.io’s tool may be unreliable. ell later confirms they switched to a script-based approach, noting Apple’s documentation now recommends /.well-known over root path for AASA, though older docs allowed both. The feature remains functional for those correctly configuring the site setting and using compatible validation tools.

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 Likes

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 Like

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 Likes

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 Likes

This is great. Thanks so much!

1 Like

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

Hi, is it still working at the moment? I use expo and the documentation mentioned to put the apple-app-site-association inside ./well-known path. It’s also mentioned in the apple dev documentation.

I did add my ASSA in the settings. However I still can’t verify my ASSA with this tool. This is the result that I got

Thank you in advance :face_holding_back_tears:

1 Like

Did you add the JSON to the app association ios site setting? I just did a test here on meta, and it worked fine:

Note that I used the validator at https://yurl.chayev.com/ (and I’ve since removed the JSON from the setting here because it was just a test), the Branch.io validator wasn’t working for me.

2 Likes

hi, sorry for the late reply. Yes I did add AASA in the setting, but I haven’t been able to make it work. I thought it was related to AASA path. Previously in this documentation, they mentioned we can serve the AASA in our root or inside /.well-known.

  • Upload the apple-app-site-association file to your HTTPS web server. You can place the file at the root of your server or in the .well-known subdirectory.

However I checked their latest documentation and it doesn’t mention serving AASA in the root, only suggested to serve that file in /.well-known.

I haven’t done more research in this one, as we move to a different approach, using script. I hope it helps

1 Like