0

I have a web application in angular 8 deployed on Amazon ec2 server with IIS windows hosting. There is a parallel mobile app which requires deep linking to be connected with my web app.

Mobile team developers provide us documentation to embed universal links on Web app server Documentation. For android it works perfectly by creating a .well-known folder and place assetlinks.json in that. For IOS as per documentation apple-app-site-association file was placed in .well-known and root folder as well, But it fails by validator provided by apple on this link [Apple Validator] Apple validator results(https://search.developer.apple.com/appsearch-validation-tool). The file apple-app-site-association is extension less which is the main cause of this issue.
Content of file is as follows.

{
    "applinks": {
        "apps": [],
        "details": [
            {
                "appID": "app-id",
                "paths": [
                    "*"
                ]
            }
        ]
    }
}

I placed an extra file apple-app-site-association.json with main extension less file and then added below rule in web.config

      <rule name="apple_json_file">
                   <match url="^apple-app-site-association" />
                   <action type="Rewrite" url="apple-app-site-association.json" />
      </rule>

and allow .json file to be readable by server or bots.

<mimeMap fileExtension=".json" mimeType="application/json" />

I also tried a solution on this Answer but didn't got any success. I want apple-app-site-association file to be validated by apple Apple Validator. Any one with solution please help.

waqar18
  • 21
  • 4
  • Try to remove the file without extension from .well-known folder. Then verify again. – MUHAMMAD TASADDUQ ALI Oct 28 '22 at 11:22
  • If you are using Angular SSR then try to place the same .well-known folder containing apple-app-site-association file in "server" folder as well. – MUHAMMAD TASADDUQ ALI Oct 28 '22 at 11:27
  • If that "server" folder attempt doesn't work then try to put the ".well-known" folder in the root directory where your domain is pointing not inside "dist" folder. – MUHAMMAD TASADDUQ ALI Oct 28 '22 at 11:29
  • No need to use re-write/redirect method. As Apple has clearly mentioned in the documentation. "After you create the apple-app-site-association file, upload it to the root of your HTTPS web server or to the .well-known subdirectory. The file needs to be accessible via HTTPS— WITHOUT ANY REDIRECTS —at https:///apple-app-site-association or https:///.well-known/apple-app-site-association." – MUHAMMAD TASADDUQ ALI Oct 28 '22 at 11:36
  • The apple-app-site-association file should not have any file extension, this question and its answers may help you: https://stackoverflow.com/questions/42370867/configure-apple-app-site-association-file-and-upload-on-server – YurongDai Oct 31 '22 at 07:44

0 Answers0