0

This may sounds crazy but just curious to know how a deep link/ URL schema reaches to an app to open it up in the device. Searched for an article but all contain how to make it work technically which I completely experienced, but could not find one how the handshake works.

If anybody can share if known, much appreciated!

Thanks.

Dhammini F.
  • 339
  • 3
  • 17
  • What do you mean, "how the handshake works"? What handshake? You know how to make it happen; you know that the system does it; what more can you want to know? – matt Jan 26 '16 at 23:32
  • Sorry about not being clear; the question is how the OS directs the URL request to the app. – Dhammini F. Jan 26 '16 at 23:36
  • But what do you mean by _that_? Why would it have any trouble doing this? – matt Jan 26 '16 at 23:40
  • Does this help? https://developer.apple.com/library/prerelease/ios/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html – matt Jan 26 '16 at 23:44

1 Answers1

1

The best information I could find so far on the subject is Wikipedia:

Unlike the Web, where the underlying technology of HTTP and URLs allow for deep linking by default, enabling deep linking on mobile apps requires these apps be configured to properly handle a uniform resource identifier (URI). Just like a URL is an address for a website, a URI is the address for an app on a mobile device. Examples of URIs that launch a mobile app:

twitter:// is the iOS URI to launch Twitter’s mobile app

YouTube:// is the iOS URI to launch YouTube’s mobile app

The format of the URI used to trigger or deep link an app is often different depending on the mobile operating system. Android devices work through intents, BlackBerry 10 devices works through BB10's invocation framework, Firefox OS devices works through Web Activities, iOS devices works through the openUrl application method, and Windows Phone 8 devices works through the UriMapper class.

fb://profile/33138223345 is an example of a mobile deep link. The URI contains all the information needed to launch directly into a particular location within an app, in this case the profile with id '33138223345', i.e. the Wikipedia page, within the Facebook app, instead of simply launching the Facebook app fb://. eBay's apps demonstrate the use of different schemes by platform. eBay://launch?itm=360703170135 is the URI that deep links into eBay’s iOS app while eBay://item/view?id=360703170135 links into eBay’s Android app

Basically the URL matching starts at the OS level. iOS will use the settings in your apps plist file for a whole bunch of other things outside the app. One of them being the deep linking.

You declare your URL scheme in the plist, and whenever the OS encounters a URL matching this scheme (usually when user taps a button or link), it will open your app and pass the URL information on. It's then your responsibility to determine what to do with this information.

Does it jump into a profile page? A particular product? That's all left up to you.

Beau Nouvelle
  • 6,962
  • 3
  • 39
  • 54