Create Deep Link for Mobile App

android, applinks, deep-linking, ios, redirect

Solution

This is now possible in iOS 9. Apple announced Universal deep links this year in WWDC 2015. You may want to watch the video - Seamless Linking to Your App.

It can now:

- Check if app installed and open the content in iOS app

- Else fails gracefully and can open the content in safari.

One of the best feature of iOS 9 after Search API's.

Problem

I want to create a promotional link for my app - which i can distribute via email. When the user clicks on the link from the email, a webpage does this: - Determines which OS (iOS or Android) - If app installed on device - opens the app - Else - takes user to AppStore (or) PlayStore (or) a custom URL. I tried using the AppLinks (applinks.org) - but I am unable to get it to work. How does the browser understand the "al:xx:xxx.." tags ? Does it only work for facebook/twitter? ``` <html> <head> <meta property="al:ios:url" content="applinks://docs" /> <meta property="al:ios:app_store_id" content="12345" /> <meta property="al:ios:app_name" content="App Links" /> <meta property="al:android:url" content="applinks://docs" /> <meta property="al:android:app_name" content="App Links" /> <meta property="al:android:package" content="org.applinks" /> <meta property="al:web:url" content="http://applinks.org/documentation" /> </head> ``` I also tried some javascript from another post - but if the app is not installed the browser shows an error: ``` <script> window.onload = function() { window.location = 'http://www.launchMyApp'; setTimeout("window.location = 'http://play.google.com/someApp';", 1000); } </script> ``` Please help with this. Thanks.

Original source

Related problems