Disable iOS deepviews on Branch.IO - ios

I´ve been battling with something with Branch.IO.
I´ve searched and searched for the answer and nothing... Everytime I click on a link provided by Branch.IO and i´m in iOS, it ALWAYS goes to a deepview webpage. I want to either open the app or open the store without this middle page.
Android and Desktop there´s no deepview.
I´ve checked inside the configuration inside the Branch.IO dashboard and I have every deepview disabled... I tried to pass in the link data "ios_passive_deepview" with a False.
No matter what I do it ALWAYS goes to this Deepview....

Related

Is there a way to avoid opening the link in browser

When using Huawei App Links (Because Firebase dynamic link doesn't work for Huawei App Gallery), this is the kind of long link that is generated.
https://example.drcn.agconnect.link/?deeplink=https%3A%2F%2Fexample.com%2Freferral%2F3c3432x&android_deeplink=https%3A%2F%2Fexample.com%2Freferral%2F3c3432x&android_open_type=2&android_package_name=com.example.mobile
When clicked on this link on an Android(Google) device where my app is not installed, I see these options:
"Open" - opens the deep link i.e https://example.com/referral/3c3432x in a browser
"Download" - opens the Google play store app with my app page
The download behavior is fine, but I don't want the open behavior, since that link actually does not exist. I understand this link still be accessed on a desktop and might try to go to the link on a browser, but for now we are okay showing 404 in such cases.
Is there a way to avoid the "Open" option? Or better would be to stop showing this screen and immediately redirect to application if installed or play store of not installed. Just like how Firebase does.
I even tried the option of landing_page_type=2 as listed here: https://developer.huawei.com/consumer/en/doc/development/AppGallery-connect-Guides/agc-applinking-createlinks-defined-0000001055514692 but that doesn't seem to work, it always show the Open/Download page irrespective of the value.

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.

Firebase Dynamic Links IOS

I have setup firebase for receiving universal links and custom url schemes. I have 2 issues here,
Clicking links on the app like whatsapp opens the browser but not the
app, however, if I get the link to the notes app and open it, it
shows an option of "open in app" after doing this, everytime I open
it in whatsApp it seems to work fine.
When I try to open links via chrome from the email app, it redirects
to the app via custom url scheme, however the problem is that, the
next time I open the app, it tends to repeat the action. Although I
have already handled the custom url scheme previously, I dont know
why its trying to do it again, kinda freaks me away.

Universal Links opened in unsupported apps, are they completely lost?

I am trying to implement Branch marketing links in my app. I want for example to be able to create a link to share with users that will route them to a particular screen in the app. I noticed from the Branch docs that for some apps the link just opens the app store and not the actual app (even if it is installed). Being based in Asia I have the feeling that most of our customers will be wanting to share the link via an unsupported app such as Line. If a user is redirected to the app store via the link and then taps “open app”, what happens? Is the link meta data lost? Does the meta data only remain if the link is opened in an app such as mail or notes?
Alex from Branch.io here:
This list in the Branch documentation gives a partial list of apps that support Universal Links, but unfortunately it is not complete. We've tried to cover the most common apps.
Line is using a custom webview (not SFSafariViewController). It doesn't support Universal Links for the initial click, but this is one of the edge cases where Branch can detect the originating app and do some custom behavior. For Line, we trigger your app's URI scheme. This means the behavior your users see when clicking a Branch link from within Line is the same as Universal Links, even though Universal Links isn't actually the protocol being used.
If you want to handle other apps where Branch doesn't have a workaround like this, you could try enabling the deepviews feature. This will cause the link to open a content preview with a button to launch the app (or forward to the App Store if not installed).
When a user with the app already installed clicks the Open button on the App Store page, all the meta data is preserved and they will still be deep linked. Branch doesn't know (or care!) what happens between when the user clicks the link and the app launches, so that gives you plenty of flexibility.
Universal Links have some restrictions - not from Branch but from Apple's implementation. One of these restrictions is Universal Links cannot be opened from SFSafariViewController.
From Branch's docs, Line is not explicitly mentioned but other popular messaging apps may be of interest. I don't have Line myself but whether Line launches websites in it's own browser or the Safari app may give you a clue.
Facebook Messenger - works conditionally
WeChat - works conditionally
Twitter - works conditionally
LinkedIn - works conditionally
Any app using SFSafariViewController - works conditionally

Custom back button for Google Chrome

I've noticed in the latest iPhone Gmail app, that if I tap a link (and if I have the Google Chrome iPhone app installed) it opens up Google Chrome, and changes the back button in Chrome to show it going back to "Gmail"
I was wondering if anyone has managed to find a way to get this to work with their own apps, or if it's a private Google API?
I've tried Google's OpenInChromeController (https://developers.google.com/chrome/mobile/docs/ios-links) though that only seems to provide helper methods to open Chrome, and not change the back button
Google Chrome uses the x-callback-url scheme to create this type of behavior.
One example is something like this:
googlechrome-x-callback://x-callback-url/open/?x-source=MyApp&x-success=com.myapp.callback%3A%2F%2F&url=http%3A%2F%2Fwww.google.com
You can customize it to have a different response for a success or failure, and define whether Chrome will open the link in a new tab. There's more information available lower in the document that you linked to.

Resources