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 « J'aime »

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 « J'aime »

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 « J'aime »

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 « J'aime »

This is great. Thanks so much!

1 « J'aime »

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

Salut, est-ce que ça fonctionne toujours pour le moment ? J’utilise expo et la documentation mentionne de placer le fichier apple-app-site-association dans le chemin ./well-known. C’est également mentionné dans la documentation Apple dev.

J’ai bien ajouté mon ASSA dans les paramètres. Cependant, je ne parviens toujours pas à vérifier mon ASSA avec cet outil. Voici le résultat que j’ai obtenu :

Merci d’avance :face_holding_back_tears:

1 « J'aime »

Avez-vous ajouté le JSON au paramètre du site app association ios ? Je viens de faire un test ici sur meta, et cela a fonctionné correctement :

Notez que j’ai utilisé le validateur sur https://yurl.chayev.com/ (et j’ai depuis supprimé le JSON du paramètre ici car ce n’était qu’un test), le validateur Branch.io ne fonctionnait pas pour moi.

2 « J'aime »

Salut, désolé pour ma réponse tardive. Oui, j’ai ajouté AASA dans les paramètres, mais je n’ai pas réussi à le faire fonctionner. Je pensais que c’était lié au chemin AASA. Précédemment, dans cette documentation, ils mentionnaient que nous pouvions servir l’AASA à la racine ou dans /.well-known.

  • Téléchargez le fichier apple-app-site-association sur votre serveur web HTTPS. Vous pouvez placer le fichier à la racine de votre serveur ou dans le sous-répertoire .well-known.

Cependant, j’ai consulté leur dernière documentation et elle ne mentionne pas de servir l’AASA à la racine, suggérant seulement de servir ce fichier dans /.well-known.

Je n’ai pas fait plus de recherches à ce sujet, car nous avons adopté une approche différente, en utilisant un script. J’espère que cela vous aidera.

1 « J'aime »