15

It used to be that if I clicked a web link to an NYTimes article from Safari, the article would open in the NYTimes app. At some point, I must have changed this setting, and now, NYTimes links open in Safari.

I can't find anything in Safari or the NYTimes app area of Settings that seems to revert to the old behavior, nor in the settings inside the NYTimes app itself. Is there a way to restore the old behavior of opening links in their respective apps?

Edit: I have NYTimes app installed, I am on iOS 9.3.1, and I am not using private browsing, so some of the typical answers (thanks John Ramos!) aren't helping here.

I have also tried deleting cookies, history, and local data from Safari, and uninstalling and reinstalling the NYTimes app -- all have no effect.

  • Someone here can keep me honest on this, but I thought it was up to the web developer to put the header code in that tells safari to 1) show the 'open in x app' banner at the top of the page, and 2) deep-links to that specific app and opens it? – fsb May 4 '16 at 19:52
  • @fbara I believe it is up to the web + app developer. – owlswipe May 4 '16 at 20:59
  • How about the other way around? My wife is on an iPhone, wants to open (at least some) Tumblr links in a browser, NOT the app. She wants to get rid of the behavior you're trying to achieve. I know how to do that on Android, but all my iPhone searches lead to questions like this one, wrong way round. – enigment Sep 7 '17 at 22:57
20
+50

This feature is called Universal Links. You can read Apple's documentation on this here.

Basically for this to work the developer of the NYTimes website needs to have a file called apple-app-site-association on their server. You can view that file on the NYTimes website here http://nytimes.com/apple-app-site-association. Within the file they can specify which URLs are redirected (on the NYTimes site, any that have a year between 2000 and 2099 immediately after the domain name) and which apps they are redirected to (four NYTimes apps). At a glance the file looks okay on their website, but interestingly it does mean that only links like this http://www.nytimes.com/2016/... will work, while anything else like this for example http://www.nytimes.com/reuters/2016/... will not. So right away it is worth noting that they've decided that they don't want all links to the nytimes.com website to open in their apps.

They also need to change a setting within their iOS apps to list which domains it is willing to receive links from. This takes the form of an entitlement called com.apple.developer.associated-domains. Due to the way their app is configured I'm unable to check the plist files within their app to see if they are configured correctly. But in my own testing, this feature seems to work okay. When I go to this article I've randomly picked on DaringFireball and click on the NYTimes link, the NYTimes app automatically launches and opens the article rather than Safari.

What may have happened is that you can tell iOS that you don't want it to pass Universal Links from Safari to the relevant app. You do this by clicking on the link that appears in the top-right corner of the screen when iOS has opened an app with a Universal Link. From that point on iOS will ignore the Universal Link feature for that site. This is fairly non-intuitive, so you might have done this without realising that it disables the Universal Links feature for the site.

Demo showing where link is to disable Universal Links

There are two methods to re-enable Universal Links for that site. Either long press on a NYTimes link and select "Open in "NYTimes" from the menu, or open the NYTimes website in Safari and click on the "OPEN" link in the Smart App Banner at the top of the site.

Demo showing where to re-enable Universal Links, method one Demo showing where to re-enable Universal Links, method two

Let us know how you get on.

  • This wasn't quite right, but the phrase "universal links" was what I needed to get to the right answer (via stackoverflow.com/questions/32729489/…). You have to tap and hold a link, then select 'Open in "NYTimes"' to restore this behavior. I'll accept once you update the answer for proper future reference. Thanks! – dcrosta May 6 '16 at 11:11
  • I've updated the answer to include that method of restoring Universal Links, but the one I mentioned does work too. I tested it repeatedly on my phone last night as I was writing the answer and the other answers on the question you linked even mention it too. :) – Alistair McMillan May 6 '16 at 11:28
  • "or open the NYTimes website in Safari and click on the "OPEN" link in the Smart App Banner at the top of the site." This opens the app but doesn't re-enable universal linking in my case. What could be wrong? – Vincent Mar 6 '17 at 15:22
0

The New York Times seemed to change the way their website handles links, as my iPhone does not open NYTimes articles in the app either. Most likely, the developers of nytimes.com decided to stop the site from auto-opening articles in the app because people we having trouble with it not working (or worse, asking you to download the app, interrupting your reading). The mobile NYTimes website is good enough that they may have decided to simplify the process by just having you read the article on the web.

One workaround: save the article for later from the web, then go to the Saved section in the NYTimes app and your article will be waiting for you in the app.

Credits to user fbara for suggesting the "web developer's fault" theory in the comments above.

  • I probably should have specified in the original question, but I do have NYTimes app installed, I am on iOS 9.3.1, and I am not using private browsing :( – dcrosta May 5 '16 at 12:13
  • @dcrosta links aren't opening the app for me either, so I'm guessing the web developers changed the code so that articles stay in the website. I updated my answer above with a theory and a workaround. – owlswipe May 5 '16 at 22:52
  • Does that mean I get 1/2 the bounty? :-) – fsb May 5 '16 at 23:36
  • @JohnRamos see Alistair McMillan's answer (and my comment, until he updates) for the proper fix here. – dcrosta May 6 '16 at 11:13
  • Ok, doesn't work for me (opening some random article) but great if it does work – owlswipe May 6 '16 at 12:04

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .