iOS Universal Links in Flutter
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).
Nour
Updated on December 31, 2022Comments
-
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 over 2 yearsTried to increment the version, deleted and reinstalled app, still didn't work :/
-
Nour over 2 yearsYes 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 about 2 yearsIt would be worth noting the source of this info; I have not been able to find any reference to this around.