So I have the following apple-app-site-association on my site, located at `stage.domain.com/apple-app-site-association`:

```
{
  "applinks": {
    "apps": [],
    "details": [
      {
        "appID": "TEAMID.application.id.goes.here",
        "paths": ["*"]
      }
    ]
  }
}

```

I've set my Associated Domains as `applinks:stage.domain.com`

But when I try to navigate to `stage.domain.com` in Safari, it doesn't register and I stay in the browser. Is there anything else I need to do? I know that I need to eventually set routing up in the app for various pages, but that isn't a necessary requirement is it? It should just pull up the app without anything else? Or am I missing something?

Also, my restoration handler:

```
func application(_ application: UIApplication, continue userActivity: NSUserActivity, restorationHandler: @escaping ([Any]?) -> Void) -> Bool {

    print("DEBUG GETS TO NSURL?")

    guard userActivity.activityType == NSUserActivityTypeBrowsingWeb,
        let url = userActivity.webpageURL

        else
    {return false}

    print("DEBUG GETS TO URL")

    return true
}

```

It gets to neither debug condition.
['https://Stackoverflow.com/questions/49951419', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/756566/']
Did you already go through the debugging steps here: <https://developer.apple.com/library/content/qa/qa1916/_index.html>

I found the validation tool linked to in step one of the diagnostic section of the above reference to be quite helpful. It will verify that you set the app association file up correctly, and often give some guidance if you didn’t.

Update:
-------

Based on your comment below regarding the link not working in Safari, I'd suggest verifying that your universal link setting for that domain didn't get disabled on your test device. 

Specifically: 

* If a user opens a universal link and is taken to the app, there is a shortcut in the top right of the status bar which, if tapped, takes the user to the web version of the link *and also disables the universal link opening the app*. To re-enable the universal link for your app, you can paste the link into an app like Notes or Messages, long press on it, and choose "Open in... [Your App]".
* The other possibility is that your web page in Safari is trying to open the universal link via Javascript or wrapped in a redirect. Neither of these will work.

There are more details in this blog post, along with some other universal link issues: <https://medium.com/mobile-growth/the-things-i-hate-and-you-should-know-about-apple-universal-links-5beb15f88a29>

Additional Update:
------------------

I have a suspicion regarding your scenario: Apple does not trigger a universal link when the user directly types a URL to a universal link domain into the Safari address bar. The assumption being that if the user explicitly entered a URL into the Safari address bar, the correct response is to open the URL in Safari. In this scenario, Safari inserts the banner that allows the user to intentionally open the link in the app to the top of the page.

You can test this yourself:

1. Install the Twitter app
2. Paste the URL to a tweet in Safari's address bar. Note that it opens the tweet page in the browser. Tap the banner with the "Open" link at the top of the page to open it in the Twitter app.
3. Open Safari again. Now Google the word "tweet" or otherwise find a page that has a *link* to a tweet (rather than typing or pasting the URL in the Safari address bar)
4. Note that tapping the link opens the Twitter app instead of the page in Safari.
Usually universal links end with `://`, so try using this URL for your example:
`applinks://stage.domain.com`.