Universal Link not working on TestFlight

I have an app that uses universal link. I have everything setup, checked and re-checked. I mean, apple-app-site-association hosted on my HTTPS server, the com.apple.developer.associated-domains entitlement configured, app profile with Associated Domain enabled, so everithing is in OK.


The universal link works when I install it via Xcode by clickin on Run button, and I saw the request of the apple-app-site-association file on my server. However when I install the app over Testflight the universal link does not work and there is no request for the apple-app-site-association file in my server during the installation process.


I found a lot of posts on the internet and on this forum of people with this exactly problem or problem very similar to this one, and I found not even one solution from another developers or from Apple.


So I would like to know if universal link works on iOS or not. I have been working on this for three days with no sucess, and I had the universal link working on Android in about 30 minutes.


If universal link does not works on iOS please let me know so I will think on another solution like deep link.


I'd test on real devices with iOS 10 and iOS 11


Thanks


Flavio.

Hey, I have the same problem on my App and I don't know how can I resolve the problem, did you achieve to resolve the problem?

I've had the same problem, but looking at my server logs, I've noticed something interesting.


When installing my app via TestFlight, sometimes the 'apple-app-site-association' file is fetched by the device from my web site as soon as the app is installed, but every now and then (and I surely don't know why this is) the file is not fetch from my site until after a significant delay has transpired. Once as long as 15 minutes later. If you are able inspect your server logs, you might see this as well. I'm wondering if this is the case for everyone reporting the problem and if this symptom might make it easier to track down the root cause.

So... because I'd prefer that my testers not run into this problem when they install my app via TestFlight.. I needed a work-around.... the app isn't quite ready for the app store .... I had to come up with a way to make that TestFlight install less painful. I am using the universal link to trigger the 'callback URL' from an OAuth Twitter login, so I needed some way to know that TestFlight had eventually done its job (perhaps minutes later) and fetched the 'apple-app-site-association' file from my web site), and that the user could confidently log into Twitter on their next attempt.


So now.. if the Twitter login callback URL doesn't get intercepted because the 'apple-app-site-association' file hasn't been fetched , and the user is directed to that 'callback URL' web page... I have setup that web page to be smart.. it tells you that the TestFlight installation is "not complete" and that it is waiting for a file to get installed.. then it checks every 15 seconds to see if 'apple-app-site-association' file has been asked for from that device.. every time it checks it puts an additionally dot '.' on the screen.. that way the user can see that it is still trying .. waiting for the file to get installed. Ultimately, the file is installed and the web page then instructs the user that they can go back into the app and try the login again... and from then on, the Twitter login successfully re-launches the app via universal linking.


This TestFlight problem doesn't rear its ugly head all of the time.. but it sure would be nice to know what the root cause is.

Any reply from Apple in regarding to this issue?

This is also happening to me, no update from apple yet or any feedback
apple-app-site-association are fetched upon install of the app, and then sometime roughly once over the next few days continuously.

You can grab the device logs via sysdiagnose and fine the file named swcutil_show.txt

This is still a problem that we are running into regularly. Most TestFlight installations will fetch the file immediately. On occasion it won't though, and that leads to major user confusion and bug reports.

Hi switfly,

Since iOS 14, iOS will try to retrieve the AASA file from Apple's CDN (it tries to cache the AASA file provided by you). if your webserver hosting the AASA file is private (e.g. behind a VPN), Apple's CDN can't cache it. In this case, you want to bypass the Apple's CDN and tell iOS to read from your private server directly, using the developer mode. To do so, there are 3 requirements.

  1. use ?mode=developer in your applinks
  2. toggle on Associated Domains in Settings > Developer
  3. your app must be signed with a development profile. it's likely not the case for your TestFlight distribution.

Everything i said here is documented in the official doc (https://developer.apple.com/documentation/bundleresources/entitlements/com_apple_developer_associated-domains?language=objc)

I was able to get universal linking working on a testflight build by implementing the following:

(1) I removed ?mode=developer in my applink (2) I toggled on Associated domains in Settings > Developer. ** I suppose the app was signed with my 'production profile', because I did not specify a development profile.

I had a coworker test the universal links with the testflight build (they dont have developer mode on their iphone so they could not toggle on the required settings) and the links did not redirect them to the application. However, as mentioned, its worked on my test device after following the steps above. My question is, how can I ensure that my current setup will work in production if I can only get it working for the testflight build on devices with developer mode?

Universal Link not working on TestFlight
 
 
Q