iosswiftxcodeurl-routingapple-app-site-associate

Password-Autofill: Can I place apple-app-site-association file elsewhere instead of root directory or .well-known


I am adding Password autofill feature to my iOS app. when I asked other developer who handles backend to place the apple-app-site-association file in the root directory of web server, he told me that the file can't be accessed directory from the root url because of the routing applied on the project. instead he says you can use following Url.

https://sv2.example.com/src/assets/apple-app-site-association

sv2.example.com is my root directory. Now what can I do. Is there any way apple can access it through above url?screenshot of associated domain capability in Xcode

{
    "webcredentials": {
        "apps": [
            "TeamID.BundleId1",
            "TeamID.BundleId2",
            "TeamID.BundleId3"
        ]
    }
}

this is my apple-app-site-association file's content. Any help would be appreciated. Thank you.

Edit: I am using apple's Password Autofill Framework for this.


Solution

  • There's a security reason why it has to be on the root directory or .well-known, it means that you have control of that domain.

    If you could specify custom paths somehow I could upload a file to Github, for example, and then tell Apple to find the association file on my custom URL and claim the domain.

    Your backend dev will have to make it happen somehow, maybe suggest the .well-known folder alternative.