154

So I followed this tutorial exactly and use the same values as the ones provided: https://blog.branch.io/how-to-setup-universal-links-to-deep-link-on-apple-ios-9

The Apple Association file is also ready in the link directory:
WEB_PAGE:PORT_NUMBER/apple-app-site-association

Everything seems to be set up on this side.

I've added the entitlements, updated the provisioning profile, and everything's set up.

When I run the app on my device, and open the link http://WEB_PAGE:PORT_NUMBER, this always opens Safari.

I even have breakpoints in the following method:

- (BOOL)application:(UIApplication *)application continueUserActivity:(NSUserActivity *)userActivity restorationHandler:(void(^)(NSArray * __nullable restorableObjects))restorationHandler

But zilch.

Has anyone perfected this? Is there something I'm missing?

1

47 Answers 47

224

There are a few possible issues.

  1. Try pasting your domain into this link validator and make sure there are no issues: https://limitless-sierra-4673.herokuapp.com/ (credit to ShortStuffSushi -- see repo)

  2. iOS logs an error message in the system logs if you don't have TLS set up properly on the domain specified in your entitlements. It's buried in the OS logs, not application logs. The error message will look like Sep 21 14:27:01 Derricks-iPhone swcd[2044] <Notice>: 2015-09-21 02:27:01.878907 PM [SWC] ### Rejecting URL 'https://examplecustomdomain.com/apple-app-site-association' for auth method 'NSURLAuthenticationMethodServerTrust': -6754/0xFFFFE59E kAuthenticationErr. Error message pulled from here, quick (incomplete) instructions on using CloudFlare for TLS here.

  3. In my personal testing, clicking/typing in a link in Safari has never once opened the app directly. Clicking from other apps (iMessage, Mail, Slack, etc.) has worked. Others have reported that clicking links in Google search results have opened the app directly.

  4. Note that if a Universal Link succeeds in opening your app and then you click through to Safari (by tapping your site in the top right corner of the nav bar in app), then iOS stops opening the app when you visit that URL. Then in Safari, you can pull down to reveal a banner at the top of the page with "Open". I wasted a lot of time on this. Note that clicking through to the site => disabling UL seems path specific, based on the paths you specify in the apple-app-site-assocation file. So if you have separate routes, yoursite.com/a/* and yoursite.com/b/*, if you click yoursite.com/a/* and it opens your app directly, you then have the option in the top right corner of the app to click through to yoursite.com/a/*. If you do that, subsequent visits to yoursite.com/a/* will open in browser, not app. However, yoursite.com/b/* should be unaffected and still open your app directly.

Let me know if you discover what the issue is. I'm personally very curious about how Universal Links work and what edge cases exist.

35
  • 1
    Same thing. So weird. Sometimes it opens the app directly, sometime it opens the webView. I wish they made the documentation clear. Operation of this feature is erratic
    – Legolas
    Commented Sep 24, 2015 at 21:45
  • 5
    Regarding 1), it is no longer required that you sign your apple-app-site-association file if you are serving it over https. Commented Nov 4, 2015 at 23:04
  • 27
    Restarting your iOS Device might help as well. I triple checked all settings and the configuration and I was absolutely sure that everything is correct but it still wouldn't work. Then I tried with another device and it worked perfectly. I then deleted the app from the original device, restarted the device and reinstalled the app, then it just worked...
    – mathz
    Commented Feb 10, 2016 at 7:52
  • 5
    How to get back in app instead of safari if someone accidentally pressed website link on right corner of app ?
    – iEngineer
    Commented Apr 29, 2016 at 13:39
  • 5
    I did not get Open in App banner anywhere. After long search, here is a solution: Type any link for your site in Notes app (which is a universal link). Now Click Done. Once it becomes a link, long click on it and select "Open in AppNAME-HERE" ! Commented Jul 20, 2016 at 16:04
94

There are a lot of ways this can go wrong. Two points caused me trouble:

  • In Xcode, when you add the Associated Domains entitlement, each entry needs to start with applinks: and then your domain name. E.g. applinks:www.apple.com.

  • Though Xcode created an entitlements file for me, it did not include in my build: I had to click that box manually.

And yes, after doing that, it wasn't necessary to sign the apple-app-site-association file: it is just plain text, and it works, as long as it's served over HTTPS. (You'll still need to sign it if you're supporting iOS 8, though.)

14
  • 4
    I also had to delete the app completely from the test device and then build and run again before it finally worked. Commented Dec 21, 2015 at 21:14
  • 19
    you save my day, this was my issue, though XCode created an entitlements file for me, it did not include in my build: I had to click that box manually.
    – cham
    Commented Jan 20, 2016 at 8:23
  • 18
    Including the entitlements file in the build fixed the issue for me as well. It's worth noting that in Xcode 8 the target membership checkboxes in the File Inspector are actually disabled. I had to go to the build settings and add the entitlements file to the Copy Resources phase.
    – Charles A.
    Commented Sep 21, 2016 at 0:46
  • 6
    @cham: can you guys elaborate on "though XCode created an entitlements file for me, it did not include in my build: I had to click that box manually."
    – Thang Pham
    Commented Jul 8, 2017 at 16:34
  • 15
    @AwaisFayyaz Go to Build Phases > Copy Bundle Resources. Click the plus sign then add your entitlement file. Commented Sep 1, 2018 at 7:12
81

To help debugging this issue, search for "swcd" in your device's console output when installing your app to see if registering your universal link worked or failed.

  1. Use an actual device, not the simulator.
  2. Delete the app from you device.
  3. Connect the device to your computer, and view the device's console output in xcode. (window -> devices -> [your device] -> open console). Keep this window open.
  4. Install your app and let it launch.
  5. Filter the console output to "swcd". If it's sucessful you will see something like the folowing screenshot. If it fails you'll see something else. If you don't see anything then you messed something fundamental like adding the Associated Domains entitlement.

Applink added successfully

7
  • 3
    Excellent tip! I was adding https:// to the applinks: entitlement and also specifying the full path I wanted to listen to which were both mistakes. I was specifying example.com/path* where I should only be specifying my domain.com and the AASA file at example.com then specifies the path against my app's bundle id Commented Feb 5, 2019 at 13:56
  • 3
    Can I wire you cash bonus?? I spent 2 days going through every step of this freaking universal link setup, nothing was helping until I tried your approach. I got really unfortunate to host my association file on a firebase's root folder for my domain, and it turned out that Apple queries .well-known/ subdirectory first, and firebase appear to respond to it with their own (!) correct association file that has no app linked. Goshhh how am I supposed to find this out, Apple?
    – nalexn
    Commented Jul 16, 2019 at 9:14
  • Ahhh great hint! I didn't know about this device console, just looking at the Xcode console output. My trouble was that 2 out of 3 deeplink domains DID work, but not that last one. And there in the console I saw that for my last domain I had misspelled it with "appllinks:<domain>" (2 L's) Oh man… anyway, thanks again for a great way of checking if Universal Links are actually registered! (I found the console logs also Removing of the links when uninstalling the app :+1 ) Commented May 2, 2020 at 0:07
  • 2
    is it supposed to be that verbose by default? Because I don't get such detailed log.. does this mean that the operation is not successful? Commented May 15, 2020 at 15:37
  • 3
    there is no swcd filtering i still see lot of not related rows
    – luky
    Commented Sep 15, 2020 at 10:59
42

There is apparently an error in the documentation for making the association file for Universal Links.

Where it says:

The value of the appID key is the app’s team ID and the bundle ID

it should say

The value of the appID key is the app’s Prefix and the bundle ID

For most apps, it seems that the Team ID and app prefixes are the same, but if your app has been in the store for many years, these values can be different.

To find this value, open the Member Center on https://developer.apple.com and look at "Certificates, Identifiers & Profiles", click "Identifiers", then "App IDs" in the table under "Identifiers". Find your app, and use the Prefix value and Bundle ID there to create your AppID for the association file.

1
  • The problem with this solution is that if you are testing locally you can't use it
    – Mr. Robot
    Commented Apr 26, 2023 at 15:03
31

St.derrick's Answer is informative.

But to enable universal links again to open in app instead of safari we need to do the following thing.

  • Long press on Universal link in Mail or iMessage, then you will see options whether to open in safari or in App.
3
  • 5
    There is no option of app , only copy, open, add to reading list etc
    – iEngineer
    Commented Apr 28, 2016 at 15:10
  • 1
    Almost went crazy debugging this problem, but THIS was the solution or me. Maybe if it's not set up correctly and Mail app opens the link in safari it always opens in safari? no idea, but i once did the long press -> open in 'myapp' ... and now the links open correctly! Commented Jul 9, 2016 at 9:55
  • 1
    Thanks a lot for this solution. I was stuck up in this for almost a day. You saved my day.
    – andrew
    Commented Nov 14, 2016 at 9:52
30

To validate apple-app-site-association on the server side, you can use Apple's official validator.

https://search.developer.apple.com/appsearch-validation-tool/

2
25

It's also super important to increment the project version or build number after integrating universal links. Even if you delete/reinstall, iOS won't pickup the links unless you bump the version.

1
  • 2
    This! The bundle version was totally what was causing my testing to fail, because I would go through all the above advice and my links would still launch Safari as iOS is using the cached result from the previous version of apple-app-site-association which had the wrong appId prefix
    – zai chang
    Commented Oct 23, 2016 at 9:52
22

I realized that be problem for me was that links to the root directory a (eg. http://example.com/) did not open my app but if I added a path (eg. http://example.com/mypath) it worked. Adding "/" to the paths list sovled it:

{
    "applinks": {
        "apps": [],
        "details": [
            {
                "appID": "TEAM_ID.BundleIdentifier",
                "paths": [ "*", "/" ]
            }
        ]
    }
}

As answered by slutsker in this Apple Developer Forums thread.

0
21

For anyone who needs to easily test opening (Universal) Links, you can also open the link in your Simulator from the terminal with this command:

xcrun simctl openurl booted yourapp_or_http://yourlink

for example:

xcrun simctl openurl booted https://www.google.com

2
  • 4
    I haven't got this to work, it always just opens up Safari. They do work when I run on an actual device though. Any ideas would be appreciated as it's a bit more painful debugging/developing without the simulator.
    – chib
    Commented Nov 28, 2018 at 20:59
  • Worked for me. There should be a "Open with <your app>" banner shown on top of the safari page. If not, pull down to refresh and it should show up.
    – Jay Sidri
    Commented Jul 13, 2022 at 23:48
17

Quick steps to check whether you have implemented Universal Link correctly.

  • Tap and hold on the link that you expect to launch the app. You should see a "Open in [your app name]" in the Context Menu.

  • Open Notes app, type the link you expect to open the app. Tap Done. The link will turn yellow and tapping on the link should open your app, and not Safari.

  • If the link http://yourDomain.com is not launching the app, try http://yourDomain.com/yourFolder/

  • In Safari, If the Context Menu shows "Open in [your app name]" in safari, but tapping the link opens the link in safari itself instead of launching the app,

    a. Try pulling down on the safari page that opened when the link was clicked like the way you 'pull to refresh'. A banner should appear that can open your app. Tap the banner to open the app, close the app by pressing home button, get back to safari and try launching the app by tapping the link again. This time on, the app should get launched because tapping the banner should have saved the preference to open the link in app.

    b. If the app still don't get launched after the step a., try mailing the link to a webmail such as gmail and open the webmail site in safari and try clicking the link. If this works, you may have been trying to launch the app from the same domain as the link. From what I have seen, launching the app from the same domain mostly fails. Probably safari wont care to check whether the destination url is a universal link, when the link is into the same domain that user is on. So try to launch the app from another domain.

1
  • 3
    That was it, have being dealing with this issue for hours, LAUNCHING THE APP FROM THE SAME DOMAIN MOSTLY FAILS. Thanks :)
    – maledr53
    Commented Jan 22, 2018 at 23:57
16
  • Universal Links will not work if you paste the link into the browser URL field.

  • Universal Links work with a user driven <a href="..."> element click across domains. Example: if there is a Universal Link on google.com pointing to bnc.lt, it will open the app.

  • Universal Links will not work with a user driven <a href="..."> element click on the same domain. Example: if there is a Universal Link on google.com pointing to a different Universal Link on google.com, it will not open the app.

  • Universal Links cannot be triggered via Javascript (in window.onload or via a .click() call on an <a> element), unless it is part of a user action.

source: https://dev.branch.io/getting-started/universal-app-links/support/ios/#appsbrowsers-that-support-universal-links

The 3rd bullet cost me about a day to figure out.

3
  • 2
    3rd bullet, same here: wasted many hours figuring that out. Apple has even a nice very stupid explanation for it: "iOS respects the user’s most likely intent and opens the link in Safari" see yourself here.
    – jox
    Commented Jun 20, 2017 at 23:34
  • 3rd bullet TOP !
    – Byteros
    Commented Apr 1, 2020 at 9:54
  • 3rd bullet should be the correct answer! I just spent 4 hours on this. Thank you
    – Rotem
    Commented Nov 12, 2020 at 15:36
11

I have found 2 useful tools that you can use to debug issues with Universal Links:

  1. On your phone, open the Settings app, select the Developer menu -> enable Association Domain Development and select Diagnostics. Insert the url that you have added to your entitlements file, and it will be validated: enter image description here

  2. The second one is mentioned in Apple's TN3155: Debugging universal links article. I recommend you read the full article, but especially the Host and verify your AASA chapter.

The mention using swcutil to verify your AASA files:

You can use these commands in Terminal by:

Running sudo swcutil dl -d <domain> to check that the AASA JSON can be downloaded successfully.

Running sudo swcutil verify -d <domain> -j <path-to-JSON> [-u <URL>] to check the contents of a downloaded .json AASA file. Verify that your domains match with -d and your URL path pattern matches with the JSON with -u. If both are successful, you will get a confirmation message.

For an app containing applinks:example.com and the AASA shown above, here is an example of using swcutil verify where “s” is the service, “a” is the App ID, and “d” is the domain:

% sudo swcutil verify -d example.com -j ./example.json -u https://example.com/test
{ s = applinks, a = ABCD123.com.example.app, d = example.com }:
Pattern "https://example.com/test" matched.

Since the pattern /test is included in the AASA, the JSON has successfully pattern matched and is verified. For the path /path/1, since it is set to be excluded in the AASA, you would see a message confirming the exclusion:

Pattern "https://example.com/path/1" blocked match.
7

Incase people here are looking for other solutions, we put together a whole step-by-step on debugging Universal Links as we've seen a lot of issues pop up, causing a LOT of headaches.

Check it out:

Universal Links Debugging Guide

Debugging Guide preview

If you're just looking to set up Universal Links fresh, this guide is really helpful:

iOS Deep Linking Setup Guide

Hope they're helpful!

2
  • Very helpful, thanks! Worked for me when running on an actual device, but not the iOS Simulator.
    – Josh Sklar
    Commented Sep 8, 2016 at 14:21
  • 4
    Links no longer valid. The image is the only thing helpful now. Commented Jun 8, 2021 at 2:35
6

Just thought I would add some things I discovered in case more people encounter the same issues as me in the future. These are mostly related to authentication errors.

Even though apple doesn't explicitly state it, the apple-app-site-association file must be served over https, even if signed. The certificate used for https must also be trusted by apple. So while a certificate added to the device in Settings -> General -> Profiles will allow https in safari, it will not allow universal links to work.

In the device logs, on an authentication error between the device and the server, there will be a value printed like "TrustResultValue" : 4. A TrustResultValue of 5 means the certificate is for the wrong domain (Eg. test.com served from www.test.com). A TrustResultValue of 4 means the certificate is not trusted for this use.

There may be some helpful steps for debugging here. The "Testing access to apple-app-site-association" section is a step by step guide for how to make sure the device is getting the apple-app-site-association file. The steps boil down to:

  1. Uninstall the app. This is necessary because the file is downloaded on install.

  2. Stop the server from properly serving apple-app-site-association.

  3. In xcode, open Window -> Devices and then select your device.

  4. Open the device logs by clicking the triangle at the bottom of the window.

  5. Clear the logs by clicking the trashcan to clear any previous logs that might be related.

  6. Reinstall the app with xcode by clicking the play button.

  7. After the app has launched, if the device is correctly requesting the file then the device logs should contain an error that can be found by searching for "apple-app-site-association".

If the apple-app-site-association file is properly served (step 2 is left out) then there should be no error. An authentication error may instead be displayed if that is the problem.

1
  • 1
    I was doing SSL spoofing using Charles Proxy and this was resulting in a trust value of 4. When I turned off the proxy, it succeeded.
    – Ben Flynn
    Commented Jul 6, 2016 at 16:31
6

We've added apple-app-site-association file to this location:

https://example.com/apple-app-site-association

On iOS 9 it worked fine, but on iOS 10 it didn't work.

It appeared that problem was with .well-known path:

https://example.com/.well-known/apple-app-site-association

Because of https://example.com/.well-known/apple-app-site-association path redirected to https://example.com

<Notice>: Allowing redirect 'https://example.com/.well-known/apple-app-site-association' -> 'https://example.com/'
<Notice>: ### Rejecting AASA file size 154466 for URL https://example.com/.well-known/apple-app-site-association

In my opinion if somehow .well-known path doesn't work correctly it breaks universal links.

3
  • 1
    The manual clearly says that "The file needs to be accessible via HTTPS—without any redirects".
    – eonil
    Commented Nov 13, 2016 at 9:13
  • 1
    The manual also clearly says that "For apps that run in iOS 9.3.1 and later, the uncompressed size of the apple-app-site-association file must be no greater than 128 KB, regardless of whether the file is signed." This file is 154 KB.
    – Roberto
    Commented Mar 3, 2017 at 9:45
  • On iOS11 your server should explicitly return 404 status for: example.com/.well-known/apple-app-site-association then swcd uses fallback to root: example.com/apple-app-site-association. You can quickly check returned HTTP status with tools like Postman Commented Oct 26, 2017 at 16:09
6

The most common cause is when user tap on the top right, thus telling iOS to NOT open the app (in this case Uber) in the future.

To fix, pull down to reveal the smart banner and tap on OPEN:

Pull down in Safari, and OPEN again

This will subsequently "remember" to open the app.

6

For ios13, there is a new format - check out here https://developer.apple.com/documentation/safariservices/supporting_associated_domains_in_your_app?language=objc

I updated my file to look like this:

 {
  "applinks": {
    "apps": [],
    "details": [
        {
          "appIDs": ["1234.app.company.appname"],
          "appID": "1234.app.company.appname",
          "components": [
            {
              "/": "/login"
            }
         ],
           "paths": [ "/login" ]
        }
    ]
  },
  "webcredentials": {
    "apps": ["1234.app.company.appname"]
  }
}
2
  • you'd need to add "exclude": true to components object in order to comment be true
    – skornos
    Commented May 20, 2020 at 11:01
  • @SurjeetRajput I have updated my answer, I copied the file from one of my production projects. This is working for me.
    – Anita
    Commented Dec 3, 2020 at 16:40
6

Sometimes I find that everything is fine with the association file but iOS decides to always open the universal link in Safari. To test if the app recognises the app link I add the URL to Notes or a Calendar entry and then long press it so the contextual menu appears. If it says "Open in {YOUR APP}" then the link is working but iOS is deciding to open it in Safari. Tapping "Open in {YOUR APP}" will tell iOS to open valid universal links via your app from then on.

5

After spending a day trying to get this to work, Restarting my phone solved the problem.

Uninstalling/Reinstalling the app didn't work either.

1
  • 1
    I really can't believe in iOS 15 such bugs with universal links are still possible - but yes, thanks man you saved my day! Commented Mar 15, 2022 at 13:31
4

I've managed to make it work, but it took quite some time and struggle. Note that unless you sign the apple-app-site-association file (signing is optional!) tapping on a link in Safari will not open your app (it has caused me a lot of headache).

2
  • 1
    That is curious. Apple states in the docs that for pure Universal Links and the use in iOS9 you don't need signing. Only if you want to support iOS 8 Handoff / Shared Web Credentials should you need to sign. Interesting! I have the same problem, so I am going to try signing.
    – wrtsprt
    Commented Nov 19, 2015 at 13:39
  • Signing is indeed optional. Tapping a link in Mobile Safari to trigger opening native iOS app is called "Web Browser–to–Native App Handoff", in which case, you will need to add activitycontinuation property to the apple-app-site-association json file. developer.apple.com/library/ios/documentation/UserExperience/…
    – Devy
    Commented Dec 18, 2015 at 20:57
4

After two days it turned out for me, that these kind of links (from branch)

applinks:xxxx.app.link

work only after Archiving (also Ad-hoc) the application and install it to the phone.

3

Took me close to a day to figure this out. The issue I had was not downloading the updated provisioning profiles in XCode (I also restarted XCode after this).

(Preferences > Accounts > View Details > Download All)

3

You can test universal links in simulator

From the App Search Programming Guide: Support Universal Links

4
  • 6
    Has anyone gotten universal links to work in a simulator? I've tried countless times and it never works. It does work using a real device with the same flows though.
    – Tony
    Commented Jun 28, 2016 at 18:51
  • I haven't been able to test this either. Trying to get Safari to trigger universal links in the simulator has been futile, despite the fact that it works properly on a physical device. Commented Jul 7, 2016 at 20:57
  • I've not been able to get them to work in the simulator either. @AlbertBori did you get this working?
    – chib
    Commented Nov 28, 2018 at 20:57
  • I'm almost certain they do not work in simulator. I'm familiar with all the other pitfalls, and I can never get them to work in simulator ..
    – Fattie
    Commented Jul 31, 2019 at 22:52
3

Hope this helps someone because this took me about two days to figure out.

We had to add www. to our associated-domains in our .entitlements file.

        <string>applinks:www.yourdomain.com</string>
        <string>activitycontinuation:www.yourdomain.com</string>

Because if we used yourdomain.com instead of www.yourdomain.com our servers did a redirect -> 304 and then didn't include the content-type: application/json for the apple-app-site-association file.

N.B. the universal links still work for yourdomain.com and www.yourdomain.com

3

If you are hosting your apple-app-site-association on Firebase, make sure to put it in /.well-known/ subdirectory! It appears that Xcode queries that URL first, and if it succeeds, it makes no attempt to query the apple-app-site-association in the root directory. For some reason, firebase engineers made the hosted websites to automatically respond to /.well-known/apple-app-site-association with an empty (but correctly formed) association file that overrides your custom one, leaving you with no clue why nothing works!

1
  • 2
    Finally! Thanks a lot. Is it written in somewhere? Firebase should document in somewhere. Commented Jul 19, 2019 at 14:42
3

In my case I needed to make the server serve the apple-app-site-association file using content type: application/pkcs7-mime. In nginx I did it using this approach:

location ~ /.well-known/apple-app-site-association {
         default_type application/pkcs7-mime;
 }

As other suggested I also had to make sure I:

Note that I never saw the "success" messages in the Console app as shown in screenshots by another user. In the console I kept getting Entry [...] needs its JSON updated because the app PI changed, but this was not an issue.

Also note that when trying to open the apple-app-site-association in the browser, the file gets downloaded instead of displayed, but this was not an issue in my case.

And as always, use a real device, re-install app whenever you change things, potentially also restart device and maybe increment app version number.

1
  • I missed the TEAM_ID element, that part wasn't clear to me in the official docs where mentioning ABCDE12345.com.example.app
    – James
    Commented Oct 24, 2023 at 8:21
3

In my case the encoding of the file was incorrect.

Make sure you encode the file using UTF-8 and that you specify it in the Content-Type header:

Content-Type: application/json; charset=utf-8

You can easily verify it by pasting your URL on this site:

Invalid encoding Valid encoding

1
  • yyyyes after a tow days of round and round , i figure out the unicode is my problem , thanks david
    – abdalmonem
    Commented Apr 5, 2023 at 17:55
2

Go to developer.apple.com and edit one of your distribution profiles. In the editing page you can open a pop up for App IDs that will show a list of your app names and in () round brackets behind the app's name it reveals all your real App IDs. Some apps might have your team ID as prefix but some do not. Make sure to use exactly what you see in that pop up menu inside the () and put it into the apple-app-site-association details appID field. I had exactly this issue with an app and its universal links.

2

The issue for me turned out to be the apple-app-site-association file. According to Apple's documentation, only the applinks parameter is required. I added the activitycontinuation parameter and it worked.

{
  "activitycontinuation": {
    "apps": [
      "9JA89QQLNQ.com.apple.wwdc"
    ]
  },
  "applinks": {
    "apps": [],
    "details": [{
        "appID": "9JA89QQLNQ.com.apple.wwdc",
        "paths": [ "/wwdc/news/", "/videos/wwdc/2015/*" ]
      }]
  }
}
1
  • 3 years later and we hit this exact issue. Adding activitycontinuation is what fixed it for us.
    – readyornot
    Commented Jun 4, 2019 at 4:54
2

Haven't really seen the exact same issue/solution combo that got it working for me so might as well add mine incase someone has the same problem!

For my app I am using a custom URL scheme (set in APP_TARGET > Info > URL Types) and set the URL scheme from here into the Firebase console to match but still wasn't working.

My problem was actually two problems:

Watch out if checking Automatically Manage Signing

If you are checking Xcode's "Automatically manage signing" setting like I was, since I was just trying to make a quick demo app, you will want to ensure that the TeamID that is used matches the one in your Firebase console. I originally went to my Apple Developer Account and copied the team ID from my Membership page, but later saw that the actual ID being used by Xcode was different. (You can find this in APP_TARGET > General > Signing > Signing Certificate. For me it looked like iPhone Developer: My Name (TEAM_ID)).

Prefix your TeamID to your Bundle Identifier in your URL Types

After I ensured these matched in my Firebase console and Xcode, my next problem was the identifier for my URL scheme. It's typical to use your bundle identifier here, but Firebase actually prefixes this with the Team ID you gave in your Firebase console, so I had to prefix it to the identifier in the URL types section in Xcode as well.

After these two fixes and re-downloading the GoogleService-Info.plist file I had no problem open up my dynamic links.

Not the answer you're looking for? Browse other questions tagged or ask your own question.