0

How to create app-site-association file for domain url (not domain url+ path) to deep link to ios application? Don't want to deep link if there is any path present in domain url.

Lets say my domain is www.test.com

so www.test.com -> deeplink to master app

I don't want www.test.com/locator.html to deeplink.

Is it fine to leave applinks paths blank?

{"applinks":{"apps":[],"details":[
 {
   "appID":"TeamID.bundle",
   "paths”:[]
 }
 ]} }
Daedalus
  • 7,586
  • 5
  • 36
  • 61
V V
  • 774
  • 1
  • 9
  • 29

2 Answers2

2

Replace apple-app-site-association file with this

{
    "applinks": {
        "apps": [],
        "details": [
            {
                "appID": "TeamID.bundle",
                "paths": ["/"]
            }
        ]
    }
}

What is going on under the hood?

There are 3 ways to define paths:

Static: The entire supported path is hardcoded to identify a specific link, e.g. /static/terms

Wildcards: A * can be used to match dynamic paths, e.g. /books/* can matches the path to any author’s page. ? inside specific path components, e.g. books/1? can be used to match any books whose ID starts with 1.

Exclusions: Prepending a path with NOT excludes that path from being matched.

So, if you just define "path": ["/"] this means you just allow www.example.com/ nothing else.

References

How to support Universal Links in iOS App and setup server for it?

Community
  • 1
  • 1
Vineet Choudhary
  • 7,433
  • 4
  • 45
  • 72
0

Got the solution. Set path as paths:["/"]

V V
  • 774
  • 1
  • 9
  • 29