From 6928941868e45eb05cb1ecaf7904d674ccbf3eeb Mon Sep 17 00:00:00 2001
From: Doug <6060466+pixlwave@users.noreply.github.com>
Date: Thu, 9 May 2024 15:46:25 +0100
Subject: [PATCH] Fix the apple-app-site-association file. (#339)

It now matches https://developer.apple.com/documentation/bundleresources/applinks
---
 scripts/build.js | 19 +++++++++++--------
 1 file changed, 11 insertions(+), 8 deletions(-)

diff --git a/scripts/build.js b/scripts/build.js
index 67adc6c..533899b 100644
--- a/scripts/build.js
+++ b/scripts/build.js
@@ -127,14 +127,17 @@ function buildAppleAssociatedAppsFile(clients) {
     const appIds = clients.map(c => c.appleAssociatedAppId).flat().filter(id => !!id);
     return JSON.stringify({
         "applinks": {
-            "details": {
-                appIDs: appIds,
-                components: [
-                    {
-                        "#": "/*",  // only open urls with a fragment, so you can still create links
-                    }
-                ]
-            },
+            "details": [
+                {
+                    appIDs: appIds,
+                    components: [
+                        {
+                            "#": "/*",
+                            "comment": "Only open urls with a fragment, so you can still create links"
+                        }
+                    ]
+                }
+            ]
         }
     });
 }
-- 
GitLab