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 curtidas

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 curtida

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 curtidas

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 curtidas

This is great. Thanks so much!

1 curtida

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

Olá, ainda está funcionando no momento? Eu uso o expo e a documentação mencionou para colocar o apple-app-site-association dentro do caminho ./well-known. Também é mencionado na documentação do desenvolvedor da Apple.

Adicionei meu ASSA nas configurações. No entanto, ainda não consigo verificar meu ASSA com esta ferramenta. Este é o resultado que obtive

Obrigado antecipadamente :face_holding_back_tears:

1 curtida

Você adicionou o JSON à configuração do site app association ios? Acabei de fazer um teste aqui no meta, e funcionou bem:

Note que usei o validador em https://yurl.chayev.com/ (e já removi o JSON da configuração aqui porque foi apenas um teste), o validador do Branch.io não estava funcionando para mim.

2 curtidas

oi, desculpe pela demora na resposta. Sim, eu adicionei o AASA nas configurações, mas não consegui fazê-lo funcionar. Pensei que estava relacionado ao caminho do AASA. Anteriormente, nesta documentação, eles mencionaram que podemos servir o AASA em nossa raiz ou dentro de /.well-known.

  • Carregue o arquivo apple-app-site-association para o seu servidor web HTTPS. Você pode colocar o arquivo na raiz do seu servidor ou no subdiretório .well-known.

No entanto, verifiquei a documentação mais recente e ela não menciona servir o AASA na raiz, apenas sugere servir esse arquivo em /.well-known.

Eu não pesquisei mais sobre isso, pois mudamos para uma abordagem diferente, usando um script. Espero que ajude.

1 curtida