Alex joined Branch as a Developer Advocate in 2016, and helped build the company's early developer relations and long-tail adoption strategies. He works closely with teams across the organization to help shape Branch's place in the mobile ecosystem, writes the Mobile Growth Newsletter, and tweets regularly about mobile-related topics at @alexdbauer.
Aug 04, 2016
At Branch, we have noticed something obvious: app developers often want to link directly into other apps. It sounds simple, but this is often frustratingly difficult to implement. That’s why we’re excited to announce a brand new, open-source SDK named Roots to help app developers do just that. This is a standalone project, completely separate from our core Branch deep linking service, and we are releasing it to the community for free use, forever. You can grab the iOS version here and the Android version here.
Here’s an example of where Roots can make your life much easier: you have a recipe app, and you want connect with a grocery delivery app so that with just the press of a button, your user would magically get a pre-filled shopping list of all the ingredients necessary for dinner. Of course this is a match made in heaven, but there are two big issues involved in actually making everything work:
Because of the complexity involved, apps that even try to implement this all do so differently. The end result is extremely fragmented linking behavior and frustrated users who don’t know what will happen when they click a link. Facebook, Twitter, Gmail, Safari, and Chrome, all respond differently.
The issue of preserving context with links didn’t exist on the web prior to the introduction of native apps. As their name suggests, URLs (a.k.a., Uniform Resource Locators) come with context embedded by definition, and because every web browser in the world supports https:// (and https:// by extension), you never have to worry that links won’t work. Fortunately with the introduction of iOS Universal Links and Android App Links, the mobile ecosystem has slowly begun to recognize that native apps are usually preferable to mobile websites. We propose making this behavior the industry standard, effectively extending the basic functionality of HTTP links to include apps. This is what the new Roots SDK is designed to do.
When implemented in an app, Roots automatically detects website/app connections and will deep link into the destination app if is installed. If not, the corresponding website will load instead. If there’s no corresponding website, the appropriate App/Play Store page will open.
Apple and Google have proprietary deep linking solutions for their platforms, but there is a third elephant in the room: Facebook. Facebook doesn’t want users leaving its core apps at all, but if this must happen, then Facebook definitely doesn’t want Apple and Google to be the gatekeepers. At F8 back in 2014, Facebook launched their own open-source App Links standard with much fanfare and a star-studded list of partners. The stated goal of the App Links project was to create an industry standard for deep linking between apps. App Links works by embedding special metadata tags in normal web pages, creating a connection between the web page and an equivalent piece of in-app content.
This is a brilliant cross-platform solution, but there were a few big issues:
Here’s the situation today: the App Links spec is robust and already widely implemented on the web, but very few apps are configured to take advantage of it. We see this as a wasted opportunity, so we decided to fill in the gaps.
Introducing the Roots SDK: an independent, self-contained library for iOS and Android that takes care of all the in-app App Links implementation details for you. If you want to launch another app from within your own, all you need to do is pass Roots a web URL corresponding to content you want. Roots will instantly parse all the App Links tags at that URL and open the destination app if it is installed. If not, you can define whether you want the user to be sent to the App/Play Store, or the web fallback URL.
On the other side, Roots provides a simple routing function to implement inside the destination app. It piggybacks on top of all the usual deep link standards (iOS Universal Links, Android App Links, and custom URI schemes) to automatically parse incoming App Links traffic and allow you to route the deep link where you want. And here’s the best part: if the URL you feed into Roots happens to be a Branch link (all Branch links conform to the App Links spec), then the context of the link will be preserved, even if the destination app is not yet installed. This means after the user installs the app and opens it the first time, they will still be sent to the right place.
With the example above, a Roots implementation would look like this:
If you are still wondering whether Branch and Roots work together, and whether you can use one without the other, the answer is both questions is yes. Roots and Branch are completely separate, but are a perfect complement for each other. When a Branch link is passed to Roots, the destination app gets access to attribution data and deferred deep linking through install, just like all other Branch link traffic. For the recipe and grocery example, all you would need to do is create a Branch link containing data keys for each ingredient, and then pass that link URL into Roots.
Our hope is that Roots makes life a little bit easier for mobile app developers everywhere, and we can’t wait to see the new experiences you will build. Let’s go fix the mobile linking ecosystem.
To help you fuel cross-channel and cross-platform mobile growth, our team works hard to deliver the most current, relevant resources.