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.
Join the DZone community and get the full member experience.Join For Free
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.
A deep link is a link to some content in a mobile app. An example of a deep link is:
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.
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.
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.
- In your app, test if Twitter is installed by attempting to launch using the openURL: method
- Redirect to the app store, if the app is not installed.
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.
- Redirect to app deep link if the app is installed.
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.
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:
- 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.
- 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.
- 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.
- Prefix websites and websites with domains with applinks:E.g. applinks:www.dropbox.com, applinks:dropbox.com.
- Dropbox added applinks: http://www.dropbox.com in the capabilities section of the app identified by the bundle Id 8KM394JM3R.com.getdropbox.Dropbox
- 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:
To learn more about Universal Links, click here.
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.
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.
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”,…
Published at DZone with permission of Dickey Singh, DZone MVB. See the original article here.
Opinions expressed by DZone contributors are their own.