1

I have this use case :

-> a Website OR random native application on my phone, doing a process on it, and at the end of the flow, this application is redirecting to :

https://my-domain/com/key=value&otherKey=value.com

The problem is, the universal link is well handled (deep links works well) if I click on it (through bloc-note or whatever) and it's opening my mobile app. But for this use case, since it's not a user's click but an automatic redirection (from the side-service application), it's opening safari and not my app...

How can I handle that?

Branch.io looks not enough, since it's not a static url. Foreach redirected URL you indeed have a different key/value in the url

Mayoul
  • 626
  • 10
  • 24

2 Answers2

1

What you are experiencing is expected behavior when using Universal Links. In your question, you mention "But for this use case, since it's not a user's click but an automatic redirection". Universal links need the end-user to physically click on the link and there can be no redirection. The main purpose of Universal Links was to prevent the end-user from being automatically redirected without their knowledge and consent. By clicking on the link, the end-user is essentially giving their consent and intention. The only workaround to this is to not use Universal Links. This is a core functionality of the Universal Links and was put in place by Apple to prevent the function you are trying to do. There is no workaround.

  • Alright, I understand, is there any way to handle it ? I mean I can send a custom callback url if the user is on mobile like `myapp://` but if the user doesn't have the application, it's not gonna works too... – Mayoul Oct 31 '19 at 09:04
0

Some example cases where Chrome does not launch an external application are as follows:

  • The intent could not be resolved, i.e., no app can handle the intent.
  • JavaScript timer tried to open an application without user gesture.

And

Chrome doesn’t launch an external app for a given Intent URI in the following cases.

  • When the Intent URI is redirected from a typed in URL.
  • When the Intent URI is initiated without user gesture.

https://developer.chrome.com/multidevice/android/intents#see-also

Simon Marquis
  • 7,248
  • 1
  • 28
  • 43