How to fix deep linking in iOS when the application has not installed in the device?
Basically what happens is that you try to deep link using the URI scheme provided above (my.special.scheme://other/parameters/here
) and it fails since the app is not installed. In that case you cannot catch the failure and redirect the user elsewhere.
You can set your BE to return something similar to this:
window.location.href = "my.special.scheme://other/parameters/here";setTimeout(function () { window.location.href = ...store_link_for_your_app..;}, 1000);
That way, if deep link fails, after 1s you'll get a redirect.
Important notes:
- Not all browsers support deep link via URI Schemes. In Chrome for example this will fail. here you'll have to use Intents, see https://developer.chrome.com/multidevice/android/intents
- In iOS 9+, safari browser will block usage of URI schemes if the app is not installed - you'll get an error on screen about your URL validity. Here you'll need to implement Universal Links, see https://developer.apple.com/ios/universal-links/