iOS Universal Links in Flutter

1,101

Solution 1

Another thing to check is if the associated domain is actually getting rolled into the build. This setting is in Xcode under Runner => Build Phases => Copy Bundle Resources. Hit the "+" button and add the .entitlements if it is missing. screenshot of xcode

(I don't remember where I came across this suggestion, whether stack overflow or a github issue, but will add it if I come across it again/remember it).

Solution 2

The device reads the AASA file only when the app’s version changes, try to change the version / use another device (/simulator of another device).

Share:
1,101
Nour
Author by

Nour

Updated on December 31, 2022

Comments

  • Nour
    Nour over 1 year

    I can't seem to get iOS universal links on my Flutter app working. Here are the steps I have taken to setup universal links:

    • Installed flutter uni_links package

    • Uploaded the following apple-app-site-association (with actual values for Team ID & bundle identifier):

      {
        "applinks": {
         "details": [
              { 
                  "appID": "xxxxxxx.com.bundleIdentifier", 
                  "paths": [ "*" ], 
                  "appIDs": ["xxxxxxx.com.bundleIdentifier"], 
                  "components": [ 
                      { "/": "*" } 
                  ] 
              }
         ]
      }}
      
      
    • Validated apple-app-site-association file via https://branch.io/resources/aasa-validator/ (worth noting that I was not able to validate with Apple's appsearch-validation-tool - received error: "Could not extract required information for Universal Links.")

    • Added the associated domain in my project capabilities: screenshot from xcode

    Opening with /usr/bin/xcrun simctl openurl or clicking on the url on my mobile device (tried from notes app) still opens the url in safari instead of opening the app.

    What could I be missing?

  • Nour
    Nour over 2 years
    Tried to increment the version, deleted and reinstalled app, still didn't work :/
  • Nour
    Nour over 2 years
    Yes my apple-app-site-association is hosted at /.well-known/apple-app-site-association. I can actually see my AASA when querying here: app-site-association.cdn-apple.com/a/v1. So I feel like that part must be correct
  • Jago
    Jago about 2 years
    It would be worth noting the source of this info; I have not been able to find any reference to this around.