2 New Easy Ways To Start Sharing Deep Links in iOS Apps

Building a sharing and referral system for your mobile app is key to accelerating viral growth and measuring your K-factor, yet there are serious challenges you’ll face as a developer. Breaking it down, you need a way of generating unique links for each user, a server to track downloads from those links, and most importantly, a way of passing parameters through app download. Coding this yourself could take up to a month of development time.

Introducing Branch deep links

Branch offers a simple asynchronous method of generating a URL that packages any data you’d like to persist through download and launch (i.e. the user’s identity to power referral rewards).

Our founders, a team of mobile app developers, were frustrated with the challenges they faced as they tried building these sharing and referral systems for their apps. After wasting time engineering poor-converting systems from scratch like everyone does, they decided to build a few tools to solve the inherent problems for everyone else.

Branch originated by generating the short URL to pass data through app download and open. The next problem to tackle was making it easier for you, the app developers, to take that URL and let your users share it in your iOS app.

Overshare kit

Sharing content and URLs in iOS 7 has often been accomplished with the popular open source library Overshare Kit, which offers a simple share sheet with a set of full color icons for each method the user has available that can accept the content.

OvershareKit Screenshot

However, if you wanted to implement Branch with vanilla OvershareKit, you’d have to subclass the OvershareKit content item, grab a Branch shortURL asynchronously for each share action, and tag the shortURL with a channel (Facebook, Twitter, etc…), meanwhile trying not to hang up the UI while your app is waiting for the URL. Luckily for you, Branch is all about simplifying your life as a developer, so today we launched our own fork of OvershareKit with Branch functionality built in! This means once you have the Branch API key plugged into your app, all you need to do is make a synchronous call to generate OvershareKit content, using all your Branch parameters as arguments, and our integration handles the rest for you!

Share sheets with automatic tracking and deep linking

Now, I’m sure you’re already wondering… What about iOS 8? We’ve got you covered there, too. As of iOS 8, Apple implemented an easy and standard way to use UIActivityViewController as a share sheet. This view controller can be initialized with an NSArray of activity items – which can include NSURLs. However, you’d have a complication from the start: again, you have to wait for the asynchronous getShortURL callback before you can pass in a URL. In addition, if you want to make use of the channel property on Branch to track where your users are sharing your app, there’s no way to specify a different URL for every activity on the share sheet! We, again, did what we love doing and simplified all of this to a few lines of code for you! How’s that?

UIActivityView Share Sheet

Starting today, there are new class methods available in the Branch iOS SDK that generate a UIActivityItemProvider object for you. It, in turn, automatically generates the short URL off the main thread when the user selects a share activity and tags the short URL with the channel! Details on implementing this can be found in the iOS SDK README. It’ll help you attribute app downloads, optimize and create invite systems, and implement smarter content sharing through device snapshotting and deep linking that passes data through download.

In the six months since our launch in mid 2014, over 300 developers have integrated our SDKs to build user-to-user sharing and referral systems. Developers using Branch range from one-dev teams to larger companies like iHeartRadio, Hotel Tonight, and Udemy. We’ve open sourced all of our SDKs, and we even organize monthly free meetups to educate mobile developers on cool ways to grow their apps.

The only requirement for using Branch? A strong desire to cut a month of development down to 15 minutes of implementing an SDK.