Link shows deepview even if app is installed, and deepview button always takes you to the app store

I’ve setup a universal deep link, and I’m using a deepview to show people a promo code before they download the app.

Here’s the link: https://bnc.lt/9unb/pm5BtynFHv

In this link I have 3 parameters, $ios_deepview : branch_default, $android_deepview : branch_default, and an internal content ID we use to direct the user to a content page.

First: Regardless of whether or not the app is installed (on iOS), the deep view page will show. Is there a way for the deep view page to only show if the app is not installed?

Second: Even if the app is installed, if you press the Open The App button, it just takes you to the app store. The deep link is not working at all when a deep view is present.

I’ve created a duplicate link, and removed the $ios_deepview and $android_deepview parameters, and the deep link properly links to the correct content page:

Duplicate link with no deep view: https://bnc.lt/9unb/geaaBgeLHv

Rock My World — Product Manager
1 Answer(s)
Answered on August 9, 2016.

Hi Eric!

You are being redirected to the App Store on iOS when the app is installed because you have enabled a custom domain (http://branch.rockmyrun.com) for your links. After a custom domain is set up, Universal Links are no longer supported for older bnc.lt links, and because of changes that Apple made in iOS 9.3, links without Universal Links To fix this, you’ll need to either remove the  http://branch.rockmyrun.com custom domain, OR (better solution) add that domain to your app’s Associated Domains entitlement.

Once this is fixed, you don’t need to worry about the first issue (showing the deep view page only if the app is not installed) because the app will always open in that situation.

Branch — Developer
Commented on August 9, 2016.

Actually we set up that custom domain afterwards. We saw the same functionality before setting up the custom domain.

 

So we just disabled the custom domain, and we still see that functionality.

Rock My World — Product Manager
Commented on August 9, 2016.

It takes 15-20 minutes for the system to update after these changes. I initially didn’t see your app in the bnc.lt domain association file for Universal Links yet, but it has just shown up while I was writing this message.

This still sounds like a Universal Links configuration issue, so a good place to start is our troubleshooting guide. If you’re having trouble after that, feel free to submit an Integrations ticket!

Branch — Developer
Commented on August 9, 2016.

Ok.. It appears to work if I text myself the address, but not if I access it through Safari. Meaning, if I go to dashboard.branch.io/marketing and click the link from there, it doesn’t work. If I click on the same link from a text message or Slack, it does work. I guess we will have to wait and see if it works from Facebook.

Rock My World — Product Manager
Commented on August 9, 2016.

That is actually correct and expected. Universal Links don’t work if you type them manually into the Safari URL bar. You can read about this here. Universal Links are also blocked by Facebook — you will need to enable the Deepviews feature as a workaround.

Branch — Developer
Commented on August 9, 2016.

Whoa.. You’re saying that if we share a link to a piece of content on Facebook, that it won’t deep link? This was our whole plan for using Branch, to share app content in Facebook posts and ads.

What do you mean exactly by “enable Deepviews feature as a workaround”?

Rock My World — Product Manager
Commented on August 9, 2016.

That is partially correct. If you just share a Branch link on Facebook, it will not open the app. Facebook pretty consistently blocks every method for opening third-party apps directly from the newsfeed. The user will be sent to the App Store page instead, and if they then open the app from there, they will be correctly deep linked.

However, if you link to a website from Facebook and then trigger the app to launch from there, it will work. This is what deepviews does — gives you a temporary stop-over point. It’s an extra click for the user, but currently the best workaround option.

 

Branch — Developer
Commented on August 9, 2016.

Ok so what if we create a web page that simply redirects to the branch link? So say I share this on facebook: www.rockmyrun.com/redirect?URL=https://bnc.lt/9unb/pm5BtynFHv

And redirect.php does nothing but redirect to the branch link. Would that effectively deep link?

Rock My World — Product Manager
Commented on August 10, 2016.

Unfortunately not. Universal Links do not fire unless the user directly triggers the link, or a redirect is triggered as a direct result of some user action (and Apple is very specific about this criteria in a completely non-transparent way — I’ve seen it break or not break simply by changing the duration of a timer).

Opening a new web browser window to a page and then issuing an immediate JS redirect won’t work. In theory you might be able to do this by redirecting to a URL scheme for your app, but your user would still see an alert box requiring a button tap, AND you would not be able to handle situations where the user does not have the app installed. This is why Branch doesn’t use this method.

Deepviews really are currently the best option here. If there were another, better alternative, we would definitely be doing it!

Branch — Developer