Under Android, you can capture part of the "http" space and use it to deep-link into an app. The YouTube app for example uses this so any links to http://www.youtube.com/ have the option of opening in the native app instead.
Is it possible to do the same with iOS deep linking? My searching shows examples only with custom schemes so I'm guessing not.
If not, how could it be accomplished? Can I have my web server do a 302 redirect from the http url to a url with my custom scheme?
Or even better, how could I detect if the app is installed and either deep-link into it or send the user to the appropriate download page?
There are 2 ways of implementing deep linking in IOS: URL scheme and Universal Links. While URL schemes are a well-known way of having deep linking, Universal links are the new way Apple has implemented to easily connect your webpage and your app under the same link.
Deep link is a technology that launches an app and opens a specific page in the app once the user clicks a URL on a web page or in another app. Implementing deep links is an exciting way to enhance the user experience by seamlessly allowing users to access the specific page without interruption.
I can happily report that a redirect from a server's http address to a custom scheme works under both Android and iOS. Would be better not to have to do this, though, so still looking for other ideas.
Here's the code I used in an otherwise empty App-Engine servlet:
@Override
public void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOException {
String query = req.getQueryString();
String deeplink =
"example:/" + // pathinfo includes leading slash
req.getPathInfo() + (query != null ? "?" + query : "");
resp.sendRedirect(deeplink);
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With