Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Deep Linking, Universal and App Links, Facebook App Links, Web Hooks & Web Links

DZone's Guide to

Deep Linking, Universal and App Links, Facebook App Links, Web Hooks & Web Links

In this post, we'll go over how to improve your mobile development by including various linking strategies and web hooking strategies.

· Mobile Zone
Free Resource

Discover how to focus on operators for Reactive Programming and how they are essential to react to data in your application.  Brought to you in partnership with Wakanda

Deep links have provided mobile app marketers and developers improved campaigns that show meaningful and optimized content at the click of a link.  They improve conversions, activations, retention, engagement and attrition-risk resurrection of churned users.

When creating call-to-actions in an in-app notification, for instance, app marketers can link to a registered deep link within another app, a registered deep link within the same app, a link to a web page, a universal link, or an app link to an app.

A web link can also call an app developer implemented web-hook passing additional data to personalize interactions and act on events.

You should first instantiate the deep link and the outcome (success, failure, deep link is null) is passed to the completion handler or listener. This allows the app developer to handle the call to action even in circumstances where the deep link failed. 

Deep Links

A deep link is a link to some content in a mobile app. An example of a deep link is:

twitter://user?screen_name=pyzeinc

A Twitter app must register at twitter:// so other apps may deep link to the specific page directly.

If the app is available on the user’s device, the operating system will ask for permission to open the app. If the app is not available, the operating system will alert the user that the app can not be opened.

Deep links usually point to some content on the page. For instance, typing the following in Safari on an iOS device will open twitter app to the Pyze Page, if the Twitter app is present on your device.

twitter://user?screen_name=pyzeinc

For instance, typing the following in Safari on an iOS device will open the Facebook app to the Pyze Page, if the Facebook app is present on your device.

fb://profile/529330563808607

Is a Target App Installed?

You can check to see if an app is installed before linking to a deep link. For instance, use twitter:// to check if the app is installed. If not, redirect to the app store.

  1. In your app, test if Twitter is installed by attempting to launch using the openURL: method
    twitter://
  2. Redirect to the app store, if the app is not installed.
    https://itunes.apple.com/us/app/twitter/id333903271
    Once the app is installed and the user switches back to the app that launched Twitter, the app has to re-execute the deep link.
  3. Redirect to app deep link if the app is installed.
    twitter://user?screen_name=pyzeinc

Web Links

Web links are http: or https: links. They can point to a web page or be deep and point to content on a web page.

https://pyze.com

https://docs.pyze.com

https://pyze.com/articles/growth-hackers-need-growth-intelligence.html
mailto:support@pyze.com

Including a web link as a call-to-action link would open the specified page in the mobile browser.

For example, you could send an in-app notification to your users when you have added a new article on your website about sharing your wishlist with your Facebook friends.

iOS Universal Links

Universal links allow using standard https: or http: links to deep-link into iOS apps, or download, install, and deep-link directly to the app without involving a third party service, or requiring a Safari app.

To enable universal links:

  1. You will need to establish trust and create an association between your website and app by placing a JSON file named “apple-app-site-association” in the root folder or in the .well-known subfolder of your website.
    1. Here is an example of an apple-app-site-association file from the dropbox website.The file references 8KM394JM3R.com.getdropbox.Dropbox, the application bundle for the dropbox app.
  2. You will need to establish trust and create an association between your app and website by adding your website domain to your app capabilities on Xcode.
    1. Prefix websites and websites with domains with applinks:E.g. applinks:www.dropbox.com, applinks:dropbox.com.
    2. Dropbox added applinks: http://www.dropbox.com in the capabilities section of the app identified by the bundle Id 8KM394JM3R.com.getdropbox.Dropbox
  3. To support Universal Links in your app, you need to implement the application(_:continue:restorationHandler:) on your AppDelegate.

Here is an example of a universal link that should open either in Safari or directly in the Dropbox app if you have it installed:

https://www.dropbox.com/s/bz5k4ql1kwzwoyp

To learn more about Universal Links, click here.

Privacy

As indicated above, universal links allow using standard https: links to deep-link into iOS apps, or download, install, and deep-link directly to the app without involving a third party service to process and host deep links. The app publishers’ app and website have full control.

Android App Links

App Links are the Android equivalent of Universal Links. An https: link points to both a website and content inside an app.

Custom URI schemes (e.g. twitter://user?screen_name=pyzeinc) are, however, fully supported by Android and many developers continue to use them.

Learn more about app links here.

Facebook App Links

You can link to web content, iOS apps, and Android Apps supporting Facebook App links from Pyze.

The web content you are linking to needs to add metadata on the pages to support iOS and Android. You will need a custom url, app store ID for iOS, or package ID for Android, and the name of the app that will handle the content. See Adding App Links to Your Existing Web Content. If your app is mobile only, see Using Facebook’s Mobile Hosting API for App Links.

You can specify a globally unique identifier that your code already understands and can parse to take a custom action within the completion handler, delegate, or lister.

Example: unique-identifer:redeem-offer-wb10

Unlike deep links, self-links do not need to be registered and are primarily used to access a known implementation within the app.

For instance, a marketer may trigger the new user tour for users who have not used the app in a long time.

Web-Hooks

The agent can POST to a webhook specified by you along with key-value pairs in the body.

For instance: https://webhook.myservice.com/eventid/2342/. Key data for personalization or tracking is also sent to the server handling web-hook. For instance, “Recency” : “3 months”, “Model”: “iPhone 6,2”, “ppi”: “401”,…

Learn how divergent branches can appear in your repository and how to better understand why they are called “branches".  Brought to you in partnership with Wakanda

Topics:
mobile app tips ,mobile ,web apps ,linking strategy

Published at DZone with permission of Dickey Singh, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

THE DZONE NEWSLETTER

Dev Resources & Solutions Straight to Your Inbox

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

X

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}