iOS Universal Links are not opening in-app
There are a few possible issues.
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)
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]
. Error message pulled from here, quick (incomplete) instructions on using CloudFlare for TLS here.: 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 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.
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/*
andyoursite.com/b/*
, if you clickyoursite.com/a/*
and it opens your app directly, you then have the option in the top right corner of the app to click through toyoursite.com/a/*
. If you do that, subsequent visits toyoursite.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. Good luck.
Universal links not working in iOS simulator
Figured it out. It was because my NAS server's web server didn't have a valid cert that would satisfy Apple's TLS. For testing purposes I ended up using ngrok to provide a valid cert and redirect into my NAS. It's a bit of a pain because every time you start then grok tunnel it generates a random but unique domain, but for testing purposes it works perfectly.
Universal Links not working
The problem was the same as described in this blog-post https://blog.branch.io/notice-inconsistent-universal-link-behavior-on-ios-11-2/
I uninstalled, restarted and installed it for 3 times, then it started working.
iOS universal links not working?
After 3 weeks... It turned out my path was incorrect. My suggestion:
set paths to ["*", "/"]
while debugging, get everything to work and test, then as the final step update the path and only include supported paths.
To be more specific the link I was trying to register wassite.com/events/123123
so I would add a path for /events
which is wrong that would register site.com/events
. I had to register /events/*
instead
Also the easiest way to test it is to enter the expected links into the Notes
app, because Safari has some weird logic on when links should be handled as deeplink.
Apple's app-site-association validator is useless, it's still failing for me complaining about my App id, when deeplinks actually work. Instead use https://limitless-sierra-4673.herokuapp.com/
Related Topics
What Is an "Unwrapped Value" in Swift
How to Wrap Text in a Uitableviewcell Without a Custom Cell
How to Add an In-App Purchase to an iOS Application
Can Afnetworking Return Data Synchronously (Inside a Block)
Getting List of Files in Documents Folder
How to Perform Wireless Debugging in Xcode 9 With iOS 11, Apple Tv 4K, etc
Layout Issues After Updating to Xcode 8
Why Uitableviewautomaticdimension Not Working
How to Ignore Touch Events and Pass Them to Another Subview'S Uicontrol Objects
Resizing Uitableview to Fit Content
The Model Used to Open the Store Is Incompatible With the One Used to Create the Store
How to Disable the Uitableview Selection
How to Change the Device Orientation Programmatically in iOS 6
Replacement For Deprecated -Sizewithfont:Constrainedtosize:Linebreakmode: in iOS 7
How to Allow Didset to Be Called During Initialization in Swift
Uitableview Cell Selected Color
Why Nsdateformatter Is Returning Null for a 19/10/2014 in a Brazilian Time Zone