Custom URL Scheme and http - ios

Using my iPhone i noticed that when i open a youtube link like http://m.youtube.com/..., this is redirect to the native Youtube app.
I would like to do the same thing but using my custom url scheme, so i would like to have a custom url, if my app is installed in the device this is redirected in it, or if it's not installed, to do something else.
I've tried to register as a custom url scheme the "http://" url scheme, but the is not listening for these urls.
edit-
I've already tried to register my custom url scheme, i want to use an html page, in that page i want to put my custom url scheme, but the problem is that i can't detect, from the web page, if the app is installed in the device

Take a look to the Associated Domains.
If I understand well your question you need to define your own domain that will be associated to your app. Every time an app will find that specific domain the OS will check if any installed app can handle it.
You need to add the capabilities as specified by Apple here
Hope it helps

For that you need to create your custom URL Schema for that you can open via another app.
Following is the Tutorial where you can create your own URL Schema and use into your app.
Here is tutorial.
You can define custom url schemes that will open your app, but you can't make your app the designated handler for certain domain names so that opening that domain in Safari will launch your app automatically.
And One thing for more detail this solution given into this question also.
Happy coding.

You need to add your custom URL schemes in Info.plist. With this schema you can launch your app.

Related

Firebase Dynamic Link isn't handled in ios app

I am using Firebase Dynamic Links to handle deep linking into my ios app (from external links) and this works fine.
My issue is when I try to handle a dynamic link that has been launched from inside the app. In particular, I am using Firebase in-app messaging with a dynamic link as the action on the card button.
I have added the capabilities and URL scheme to Xcode. The documentation states that I use the Firebase app bundle as the URL scheme value. The only thing that isn't clear is whether this means the Firebase project id or the dynamic link domain which is the one set in the capabilities tab as the applinks: value.
When I tap on the button to launch the dynamic link it does recognise it as a dynamic link (because it doesn't just open my hosting domain in the browser), but it redirects to the browser first and asks me if I want to open the app (that I just came from).
Does anybody know how to configure this behaviour so the links don't ask you first? Would this then immediately handle the link in the app?
UPDATE
I was able to get the app to handle the dynamic link immediately in the app by skipping the preview page. You do this by manually constructing the link and setting the efr=1 parameter. This article explains it all: https://firebase.google.com/docs/dynamic-links/create-manually
BUT - although my app was handling the deep-link, it STILL redirected to the browser where it attempted to load the web.app domain from hosting.
I feel this could be something to do with the URL types setting in Xcode which if set properly should prevent it from trying to handle links in the browser.
UPDATE UPDATE
For some reason, this just stopped redirecting to the browser and I have no idea why. I watched a Firebase video and the guy did mention something about iOS being weird, and that Safari can break dynamic links and he recommended always testing them from the notes app. Weird. I wonder if something got pwned somewhere. I will write up an answer. 👍
Not entirely sure why, but this just started to behave. The dynamic link I am using in the in-app messaging campaign is the long-form URL with the efr=1 parameter to skip the preview page in the browser.

How to configure deep-linking in iOS with Firebase Dynamic Links?

I'm trying to configure Firebase Dynamic Links into my iOS project and I'm having trouble interpreting the documentation here and how it needs to be adapted to my specific scenario.
In particular, when creating a deep link manually, I don't know what I should put instead of your_deep_link in the following example:
https://your_subdomain.page.link/?link=your_deep_link&apn=package_name[&amv=minimum_version][&afl=fallback_link]
They say it should be http or https, so I used a generic https website URL for the marketing page of my app. But then in XCode, in this doc there they say:
In the Info tab of your app's Xcode project, create a new URL type to
be used for Dynamic Links. Set the Identifier field to a unique value
and the URL scheme field to be your bundle identifier, which is the
default URL scheme used by Dynamic Links.
So nowhere do I specify that my app should be open instead of the marketing website when loading on a device where the app is already installed. And I think that's why when I try to open this link in my iPhone's browser, it just loads the page there in the browser:
https://debugapproofreferences.page.link/?link=https%3A%2F%2Fapproof.derbigum.com%2Freferences%2Fleads%2F5b98ca7a-18f7-4ffa-8dbe-aed51b94f18b&apn=com.derbigum.approofreferences&ibi=com.derbigum.ApproofReferences&isi=1321450315
Note that I have 3 variants of the same app depending on the environment (Debug, Beta, Prod), so associated domain is set to applinks:$(DEEP_LINKS_DOMAIN), and DEEP_LINKS_DOMAIN is a user-defined setting depending on the environment, and for the Debug environment I'm working on right now, DEEP_LINKS_DOMAIN=debugapproofreferences.page.link.
Obviously I'm missing something here, and it's the first time I ever try to configure deep links so I'm a little lost.

iOS Universal deeplinking without third party app

I am implementing universal deeplinking, I don't want to use any third party framework I have the domain and I have uploaded the apple-app-site association file. Now I want to test if everything is correct or not. How to create the universal link, how to specify ios url scheme and app id in the link ?
Universal Links do not look any different than normal links with your domain. If you registered your AASA at yourdomain.com/apple-app-site-association then yourdomain.com/?example=data should open your app. In the comments you mentioned you want it to open the app store if its not installed. You'll actually need to redirect your link to go to the app store. The Universal Link will not automatically handle that. So yourdomain.com/ will actually need to return a 301 redirect to the app store url. Branch links have that functionality built in if you'd like to save yourself a lot of time.

iOS / Uber integration: link_text and partner_deeplink not working in testing

I'm making an iOS (v8.3+) app which is a mapping app. The user can define a starting point and destination. They can then tap the Share button and choose "Open in Uber", which will launch the Uber app via a deeplink URL like this:
uber://?client_id=MY_CLIENT_ID&action=setPickup&link_text=Watch%20progress%20in%20my%20app&partner_deeplink=SOMEDEEPLINK%3A%2F%2F&pickup[latitude]=123.456&pickup[longitude]=123.456&pickup[nickname]=PICKUP&pickup[formatted_address]=123%20Elm%20St&dropoff[latitude]=123.456&dropoff[longitude]=123.456&dropoff[nickname]=DROPOFF&dropoff[formatted_address]=456%20Elm%20St
(This sample URL includes some obviously fake data, for the sake of simplicity.)
I've registered at Uber and have a valid client ID. This call (via openURL) works correctly: the Uber app launches with the starting point and destination already populated. This is ALL that I've done with Uber; there's no other calls being made at all.
The problem is that the special branding text does not appear within the Uber app during the trip (and of course the related partner_deeplink doesn't work either).
What do I need to do in order to get it to work? Do I need to "enable" this functionality somehow? My app has registered its own custom URL scheme that I use as the "partner_deeplink=SOMEDEEPLINK%3A%2F%2F" portion of the uber:// URL. I know this works because I can use my custom URL scheme in Safari and it successfully launches my app.
Thanks in advance for any insights!
You need to Request Full Access in the Uber Developer Dashboard to get activated for the Trip Branding feature. Please check out the documentation here.
As soon as you're activated, you can set defaults for the custom assets and the deeplink parameters you're referring to are essentially used to dynamically override these defaults.

Is there a list of iOS apps that can be called using custom URLs?

It is possible to launch your own app via custom URL scheme as described at http://iosdevelopertips.com/cocoa/launching-your-own-application-via-a-custom-url-scheme.html for example. Is there a list of the apps that use this mechanism somewhere already? A list of custom URLs available to date? If you have or know an app that uses this mechanism, adding it here will also help.
See http://wiki.akosma.com/IPhone_URL_Schemes
http://www.onemillionappschemes.com, an open source Custom URL scheme site where you can contribute URLS (by scanning your iTunes library) and where you can pick up everything that has been found so far

Resources