Using DNS to solve the mobile deep linking problem
drhod.es
drhod.es
You can register something like https://example.com/posts/{post_id} and have it open the posts activity and show the specified post (if the user chooses to open the url using the 'Example App'). If the app is not installed, the url is opened by the default handler of https...
It's actually pretty common in Android. Methinks you're an iOS user :)
> any app could register to listen to those addresses
This is core to the Android IPC design. Apps/Activities describe what they can handle (Intents, actions, filters), and I think it works pretty well. Android will ask you if you want the given app to be the default or not, and you can always un-set the default. Also, if you have a new app that can handle the given link, the next time you try to launch that link you'll be prompted to see if you want to use the new app, and your previous selected default will be highlighted as a reminder.
Also, I'm generally a believer that if an app is registering for an Intent action filter that it does not handle well/shouldn't handle at all, then users will give it a lot of bad review feedback, and apps will trend towards doing the right thing.
That's a feature, not a problem, and it's the kind of flexibility I expect from Android.
Take the domain reddit.com, for example. There are several Reddit apps, two or three of which are very popular. If the app to open was controlled by the owners of reddit.com, how would my favourite third-party app be able to register to handle those links?
This really is a solved problem on Android.
When YouTube came pre-installed on iOS in the first few versions, when you clicked on an (HTTP) link to YouTube it would open the app. It was a great experience because the YouTube app had a nicer experience than the web. It would be great to be able to do this for more apps, if those apps wanted it.
They don't let you choose which app you want to use? I know that's consistent with the half-assed way iOS (and honestly, Android) implements many things in the OS, but it's still pretty bizarre that they'd offer URL handling but no way to choose which app to use once or permanently.
Android has IMO done a good job of supporting deeplinks to some apps "just work" by allowing apps to handle HTTP URLs with specific host + path patterns (though it is noteworthy that this can lead to security problems!), but iOS does not support this same functionality.
I do, however, agree with the author in that a more seamless integration pattern that can use existing infrastructure would be ideal, but it seems that for now, the pattern of using metadata, HEAD requests, or Link headers in responses is as good as it gets.
On another slightly relevant note, from the perspective of linked data and the semantic web, the <link> tag or "Link" header (both which are suggested by Google and URX) is meant precisely for this kind of reason: being able to link separate resources with a given relation (e.g. "alternate") who may have varying display/device/media qualities (e.g. media queries). Because semantic linkage is between two nodes of the web graph rather than DNS (which I guess would be a subgraph of the web?), one is able to use semantic metadata such as http://schema.org/docs/actions.html to describe not only how to access/consume a resource, but also alternate ways to do so (e.g. from an Android device instead of a desktop client).
Again the above isn't completely impossible to do with DNS, I'll give you that, but it simply is less tenable to assume template-like qualities of all URIs or to ignore the semantic implications of redefining how linked data has worked for the last decades.
So basically the "problem" outlined here is not a problem in itself, but merely a limitation in iOS and iOS is what needs to be fixed, not the web.
Gotcha.
Lets stop bending over backwards for the fruity company, eh? If you want modern and advanced features, stop buying phones with software supplied by a company hellbent on removing choice.
On a more concrete note, there are scenarios where neither DNS nor special HTML metadata work. A great example of this is Uber or Lyft. Both of these apps support mobile deeplinking, however there is no real concept of a "page" in these apps. These kinds of apps are more like utilities or services (ride sharing, making phone calls, starting a run, etc), rather than content to consume (reading the news, playing music, watching a video, etc).
Proof of concept: https://www.urdesk.net
For example, the cases that can arise are :
1) User does not have app installed.
2) User has app installed and prefers to use the app for the service (Something like google maps). This preference can be stored in the shared settings space.
3) User has the app installed, but prefers to use the browser for the service (Like google search / wikipedia / yellow pages / amazon )
-----X----
In 1) When clicking on a url like www.amazon.com/gp/product-id, The browser cannot find an app that has access to shared settings. Hence, the only thing that can be done is to open the url on the browser.
2) When clicking on a url, (like google maps directions), The browser reads from the shared space and sees that this is a candidate for an app open. Now it can open the app and pass in the url. The app can use this path to figure out where to take the user to in the app.
3) When the user clicks on the url, and the settings say the user prefers to use the browser for this kind of link, the browser can open up the URL.
However spoofing UDP packet source IP address is very hard on the open internet due to egress filtering.
See STEED...
http://g10code.com/docs/steed-usable-e2ee.pdf
But, yes! DNS is the correct and appropriate location for items like the OP posted... built-in widely used distributed 'trust'.
Apple already has tech in place to both associate a native app with a domain name (so you can share login keychain items between a native app and its corresponding site in Safari), and to associate a specific HTML page with a native app + optional deep-link URL (see: the 'open in <X app>' banner in Safari).
The fact that Apple hasn't connected the dots to provide a better experience is bizarre, but seems to be one constrained by product decisions rather than pure technical limitations. Mucking around with DNS adds in a lot of complexity for few apparent gains.
(To say nothing of the major problem this doesn't seem to be trying to solve, which is iOS not having a system like Android's Intents to manage routing a single desired action to multiple apps that could all potentially handle it)
Why not have an ios:// (or android://) prefixed URL, and have whatever follows that determine the app? If you passed along the rest of the path, you could specify logical resources to link to.
The problem there is you can't have a single URL that just goes to the web page if there's no app installed. That's what the author is trying to solve.
Android has a solution where an app can handle all links to a certain domain. (The OS asks you if you want to use the browser or the app, and you can set it to always use the app if you like.)
I think from an HTTP perspective, the right way to solve this is to use vendor specific content types and have the OS resolve whether to open it in an app or not.
So when a link is clicked on in a browser, you use the request's Accept header to indicate which apps are installed on the device (and have registered a custom content-type). The server then can respond with a custom content type and let the OS dispatch the response to the appropriate app.
For app to app links, the OS could just perform an HTTP HEAD to see which app to dispatch to.
Last I recall, this is how YouTube works to open the app when you try to play it from the web player on a mobile device.
A problem we all have right now is that of authenticating to wifi. Many wifi spots use ad-hoc solutions that work poorly on many systems. I feel there is a legitimate reason for a wifi spot to direct me to its homepage when I associate with it, but the way that's done is not in the RFCs, so may wifi spots don't work for my devices.
What are you describing as the "legitimate reason" for WiFi devices to do this?
That this is presently implemented as a man in the middle attack is a failing of the 802.11x protocols. the 802.11x standardization committees should have agreed on a documented, standard way for access points to do what so many had to bolt on as an afterthought anyway.