Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Get info for service 'applinks', app ID '<<NULL>>'

Trying to implement universal links in my iOS app running iOS 10, whenever a click a link in my webpage I get the following message in the device log:

Feb 24 15:07:11 iPhone swcd(CoreUtils)[10142] <Notice>: Get info for service 'applinks', app ID '<<NULL>>', domain 'www.redacted...'

My app is setup with the required entitlements and capabilities for this domain. My associated domains entitlements key contains these domains:

applinks:redacted.com
applinks:www.redacted.com

The server is hosting the apple-app-site-association file on the root folder over https. I made sure the content-type of the file is set to application/json and there are no redirects leading to it. The contents of this file are:

{
    "applinks": {
    "apps": [],
    "details": [
      {
        "appID": "teamid.redacted-app-id",
        "paths": ["*"]
      }
    ]
  }
}

The way I'm testing this is by going into my site and tapping the first link I find, every time I tap this link I get the message I pasted above and the link opens in safari.

like image 610
arclight Avatar asked Feb 24 '17 14:02

arclight


People also ask

What is universal links in iOS?

Universal links allow your users to intelligently follow links to content in your app or to your website. Learn how the latest enhancements in universal links give your users the most integrated mobile and desktop experience, even when your app isn't installed on their device.

How apple universal links work?

Universal Links are standard web links (http://mydomain.com) that point to both a web page and a piece of content inside an app. When a Universal Link is opened, iOS checks to see if any installed app is registered for that domain. If so, the app is launched immediately without ever loading the web page.

How do I test a universal link?

TEST THE UNIVERSAL LINKS Run 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.


2 Answers

Your description of the problem does not provide any smoking gun indicator of what the issue might be. As I indicated in my previous comment, to really work through Universal Linking issues it is best to know everything that was configured and have a proper test plan that allows the configuration and the testing to be reproduced. There are just too many areas that could be causing problems.

Generally, issues with Universal Linking fall into being either setup issues or testing issues:

Setup Issues

  • Is the AASA file properly named and properly signed, is it being served from the correct location, are all entitlements correct?

  • Are the device and provisioning certificates all error-free?

  • Are you testing with a link that the app has been properly configured to support?

Testing Issues

  • Are you testing with a physical device? (some say Universal Links now work consistently in the simulator with iOS 10, but I'd still use a physical device)

  • What links are you testing? You indicate that you are "going into my site and tapping the first link I find." Are these links you are finding in the "redacted.com" domain? I would not use "www.redacted.com" as "www" gets special treatment by many systems and may not work as anticipated.

  • Could the AASA file have failed to update when the app was first installed/launched due to an issue with the testing environment's network connectivity? I find that the AASA will fail to download if Charles Proxy is capturing traffic, for example. If the AASA file does not make it to the device, Universal Linking will not work.

  • When testing, it sounds like you are not first pasting the link into Notes and then long-pressing on it. I would strongly recommend that you always test in this fashion first, so as to rule out the issue being related to your website, the application from which you are tapping the link, or the manner in which you are deploying the link (Universal Links will not behave as expected if you paste them into the Safari address bar, for example). When you do test by long-pressing on a link in Notes you should see "Open in App" menu option. If you do see this, but tapping on the link does not open the app, this would indicate that Universal Linking has been disabled on the device.

  • What is the behavior you are expecting to see when you tap on these links, and what is the actual behavior you are seeing? I often encounter people who believe Universal Linking is broken because they are testing a scenario that Universal Linking does not support. Are you sure the behavior that you are testing for is supported?

  • Are you using a device and an iOS version that supports Universal Links? Testing should be performed on physical devices, as mentioned earlier, and on iOS versions after 9.0 (where Universal Linking was introduced).

When Universal Linking does not work, there are a lot of things to check. I recommend running through Alex Austen's super blog post on this topic, as doing so may help you spot the problem (here: https://blog.branch.io/how-to-setup-universal-links-to-deep-link-on-apple-ios-9/).

Branch also has a number of tools/resources for identifying Universal Linking issues. They are specifically intended for use with Branch links, but you may still find them helpful:

  • AASA Validator: https://branch.io/resources/aasa-validator/
  • Universal Link Validator: https://dev.branch.io/getting-started/universal-linking-validator/guide/
  • Universal Linking Troubleshooting Guide: https://support.branch.io/support/solutions/articles/6000153326-ios-universal-links-troubleshooting-guide
like image 182
dwestgate Avatar answered Sep 21 '22 20:09

dwestgate


Look at the logs here is how (taken from SO):

  • Xcode –> Windows –> Devices & Simulators
  • Click on device in the left pane Click Open Console
  • From there, filter on "swcd" (SharedWebCredential Daemon). Keeping this console open.

You might need to open the console before installing your app dunno if it saves history while closed.


My problem:

I had my apple-app-site-association file hosted on subdomain.mydomain.com but then in Xcode I had Associated Domains set to applinks:*.mydomain.com. In the console mentioned above I saw that in this case the app was trying to get its apple-app-site-association file from mydomain.com. So I changed the Associated Domains to applinks:subdomain.mydomain.com

like image 35
h3dkandi Avatar answered Sep 18 '22 20:09

h3dkandi