My app supports universal linking and in most cases it works without any issues, tapping on a link opens the app like it should.
But sometimes, i'm not sure why, it stops working.
It happened a few times to one of the users, tapping on the link stopped opening the app and instead it opens the web.
And from that moment there is nothing you can do to make it work again.
I know that if you tap on the link in the top right corner on the status bar, it disables the universal linking and from that moment tapping on a link will open the web. and to re-anable universal linking you can tap the link on Notes App(for example) and tap the "Open in MyApp" button.
But this doesn't seems like the case, the user told me he is not pressing the link on the status bar, and even more weird, when trying to re enable the universal linking by tapping the link in Notes App, the "Open in MyApp" button is missing.
Any ideas what could cause this issue?
How do I set up Universal Links for my app? Log into your Apple developer account and go to the app's ID page. Enable the Associated Domains app service. Take note of your Prefix (bundle ID) and your ID (team ID) - you will need them later.
TEST THE UNIVERSAL LINKSRun the application on the simulator once to make sure the application is installed and running fine. 2. Keep the same simulator launched and running. Go to your simulator browser and open type the ngrok domain address i.e., https://1bd39880fbad.ngrok.io in my case.
Start the iOS 10 simulator and run your app. Switch out of the app using multitasking. Open up the Messages app in the simulator. Create a message with the link you want to test and send it.
Based on my previous experience it could happen for various of reasons:
apple-app-site-association
is not available for user or is available with insecure connection. Here are possible origins of such problem, I am sure there are others as well:
apple-app-site-association
file on your site. Even though it should redirect to your app, Universal links feature needs to check existence of this file on site. It's done first time at app installation and each time you open your link (I checked on iOS10.3 with Charles). Note, that it does not wait the check to be completed and shows or does not show "Open in MyApp" button based on previous check. Even if user has internet on, your site could be blocked by firewall or something.apple-app-site-association
file, but he access it from a network or via a proxy that requires you to accept some certificate in order to decrypt your HTTPS access. Hence your HTTPS traffic became insecure. iOS checks that and fails validation of apple-app-site-association
file.apple-app-site-association
file with good secure connection now, but previous access failed because of previous reasons -> user won't see your app opened this time or "Open in MyApp" button in context menu for reasons I described before. How to fix that? No idea, just try couple of times all the time.There are a lot of other reasons for that to not work, but in those cases there will be some 100% specific steps to reproduce, like does not work for certain /path
or for debug/release candidates or for test server. It seems that is not your case so I won't cover it here.
Helpful links (quite a lot of repetition, but if you stuck, it's worth to repeat it):
To me it happens the association file is sometimes not downloaded upon the app's installation even when the device can access the file from Safari.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With