From b5f4e8155ba6f7077b5fe4066c14ca150548a839 Mon Sep 17 00:00:00 2001 From: Muhsin Keloth Date: Wed, 8 Jan 2025 21:25:11 +0530 Subject: [PATCH] chore: Configure iOS universal linking (#10651) - Moved `apple-app-site-association` to `.well-known/apple-app-site-association` https://docs.expo.dev/linking/ios-universal-links/#create-aasa-file - Updated the paths pattern to accept conversation links only. --- app/views/apple_app/site_association.html.erb | 2 +- config/routes.rb | 2 +- spec/controllers/apple_app_spec.rb | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/views/apple_app/site_association.html.erb b/app/views/apple_app/site_association.html.erb index 80adc2959..e5cfa0bd5 100644 --- a/app/views/apple_app/site_association.html.erb +++ b/app/views/apple_app/site_association.html.erb @@ -4,7 +4,7 @@ "details": [ { "appID": "<%= ENV['IOS_APP_ID'] %>", - "paths": [ "NOT /super_admin/*", "*" ] + "paths": [ "/app/accounts/*/conversations/*"] } ] } diff --git a/config/routes.rb b/config/routes.rb index 0c2c7804e..a12356579 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -461,8 +461,8 @@ Rails.application.routes.draw do # ---------------------------------------------------------------------- # Routes for external service verifications - get 'apple-app-site-association' => 'apple_app#site_association' get '.well-known/assetlinks.json' => 'android_app#assetlinks' + get '.well-known/apple-app-site-association' => 'apple_app#site_association' get '.well-known/microsoft-identity-association.json' => 'microsoft#identity_association' # ---------------------------------------------------------------------- diff --git a/spec/controllers/apple_app_spec.rb b/spec/controllers/apple_app_spec.rb index ed9f986a0..a51700b63 100644 --- a/spec/controllers/apple_app_spec.rb +++ b/spec/controllers/apple_app_spec.rb @@ -1,9 +1,9 @@ require 'rails_helper' -describe '/apple-app-site-association', type: :request do - describe 'GET /apple-app-site-association' do +describe '.well-known/apple-app-site-association', type: :request do + describe 'GET /.well-known/apple-app-site-association' do it 'renders the apple-app-site-association file' do - get '/apple-app-site-association' + get '/.well-known/apple-app-site-association' expect(response).to have_http_status(:success) end end