Can you open an iOS application from the HTTP URL scheme?

I would like to open an iOS app similar to how it can be done on Android, i.e. using a specific web address instead of a custom URL protocol.

Here's how it works on Android. The Reddit is Fun app is a great example:

  • The user is in his mail application, browser application or something like that.
  • The user clicks a link to the reddit message. In this example, the link is " http://reddit.com/r/example "
  • Reddit is a fun app configured to handle http://reddit.com/ "links
  • Android displays a dialog box that provides the user with the following options:
    • Open link in web browser
    • Open link in Reddit is Fun

I tried to find reference material on Apple iOS URL schemes, but everything I have found so far indicates that you need to have your own URL protocol and that you cannot use http: //. You will need to use something like reddit: //.

The great thing about defining an actual web address as a URL scheme is that if you didn’t have a Reddit is Fun app, the browser will automatically open the page, and that will be a big margin. If you use a custom URL protocol, for example, in iOS, if your device does not have an installed application, there is no backup. There is no indication that he did not pass. There is no indication that he was trying to do anything.

Does anyone know a way to open the application this way? For example, is it possible to open the reddit application by clicking the http://reddit.com/ link?

Edit: I am very interested that iOS already supports this to some extent through YouTube links .

Edit: There seems to be no way to do what I want on iOS. However, this post contains some useful tips on what to do. I hoped that everything would change from 2009.

+7
android ios url-scheme custom-url
source share
4 answers

Now it is allowed on ios in what they call "Universal Links": https://developer.apple.com/library/ios/documentation/General/Conceptual/AppSearch/UniversalLinks.html

There is a Cordova plugin to support this if your source is based on html: https://github.com/nordnet/cordova-universal-links-plugin#android-web-integration

+4
source

What you found is correct, it can only be done using a special scheme.

+1
source

Let me tell you how on iOS this is achieved by most applications, I hope Reddit is Fun too.

The Http link redirects you to a web page that checks to see if your iOS application is installed by calling the custom URL associated with your application.

If it returns a failure, the web page loads, otherwise the application starts with a specific view .

Hope this is what you were looking for.

+1
source

You can really do this, but you will need to place a page on your server for each reddit article to which you want to set a link. We built a dynamic version of this in Branch so that we don’t have to manually create the page every time, and we also discover iOS and Android. But for manual page creation, the following steps are performed:

If you want to send a link to http://reddit.com/r/example , you need to create a page and place it on your server (for example, http://yourapp.com/hosted-links/r/example ). It should look like this:

<!DOCTYPE html> <html> <body> <script type="text/javascript"> window.onload = function() { // Deep link to your app goes here document.getElementById("l").src = "reddit://r/example"; setTimeout(function() { // Link to the App Store should go here -- only fires if deep link fails window.location = "http://reddit.com/r/example"; }, 500); }; </script> <iframe id="l" width="1" height="1" style="visibility:hidden"></iframe> </body> </html> 

Now you can link to your server http://yourapp.com/hosted-links/r/example , and it will be opened accordingly on iOS, whether the user has an application or not.

+1
source

All Articles