Professional Documents
Culture Documents
LESSONS LEARNED
PART ONE
prototyping and design | 5
PART TWO
start with a stable foundation | 6
PART THREE
accounts and social login | 7
PART FOUR
creating a backend to manage services,
data, and identities | 10
PART FIVE
adding data from third-party APIs
for fun and profit | 11
PART SIX
making money from your mobile app | 12
PART SEVEN
app marketing for developers | 15
PART EIGHT
progressive improvements and testing | 17
PART NINE
analytics and what to track | 19
PART TEN
streamlining your workflow | 22
3
Introduction
We know firsthand that its hard to build Our experience building Cannonball made it
successful iOS and Android apps. Weve built so much easier to build Furni the following
quite a few: the Twitter app itself, and also year. We thought wed organize what weve
lots of apps and samples written from the learned into a chronological playbook that
ground up with no Twitter internal systems you can use as a guide when you build apps.
or tooling. And of course weve learned a lot Over the coming weeks, watch for our series
about how our partners build apps and of posts with tips on the tools and processes
tackle problems. that weve learned.
At this years Flight conference, we showed We dont pretend to have all the answers,
o the power of some of the new features and you certainly dont have to use all the
from Fabric, with two apps that we created tools we mention but wed like to pay it
and open-sourced on GitHub: Cannonball, a forward, based on knowledge weve
magnetic poetry game, and Furni, a mobile- gathered from colleagues and learned by
first furniture store. Building these apps has making mistakes.
been exciting, and educational. Moving from
ideation to product on a (very) small team,
we got a lot of assistance from others, and
from tools available through Fabric.
4
PART ONE
Prototyping and design
Even though good design seems obvious Our finish poem icon, alone and in context.
5
Then get a prettier version working. No Im not the only one.
amazing mobile app relies entirely on
system-provided views, animations, and With Cannonball in particular, we were trying
interaction design. Once you walk you can to release the open source code
start to run with animation libraries and simultaneously on Android and iOS, while
physics engines that make your app more also shipping it to the App Store and Google
fun to use. Once youve made the app Play in time for the Flight conference, while
functional, its important to make it fun. building on a platform that was (at the time)
top secret. Our tester pool was pretty limited
In the future, we could certainly extend (employees only), and the number of things
Cannonball to make the process of building a that could go wrong on any given build was
poem more visually dynamic, or update the very large. We also knew that the people
horizontal scrolling behavior in Furnis main downloading it on day one would be
screen to feel more modern. developers and that a major part of our
platform was crash reporting. No pressure.
But we didnt in v1, which leads me to the
next thing we tackled. Using Crashlytics Beta really saved us.
Simulators and emulators can take you pretty
far for some amount of testing, but theres no
PART TWO
substitute for getting your app on real
Start with a devices, being used by real people who use
stable foundation and abuse it in ways you couldnt predict.
Having our colleagues test out the apps
With Cannonball and Furni, building an open helped us find and solve dozens of bugs we
6
The combination of beta testing, crash PART THREE
reporting, and analytics was particularly Accounts and
helpful for getting a sense of how bad social login
things were inside the app, and how eective
our testing was. It doesnt matter if you send
a build to 500 people if only 50 of them try With the exception of my BART trip planner,
it, and only 20 get past logging in: your app every single app on my phone features some
people tested, for how long, and the top youve created an account, while others rely
screens where they spent their time in the on local data storage until you share
app and, on the flip side, which ones hadnt information or sync your account to a remote
been as thoroughly tested. We were also able source. But at the end of the day, each app
to see the percentage of people who actually oers the option, the ability to track who you
edge case and what was a showstopper. does. In my case, some services get my email
address; which address they get (work,
Beta testing the app and actively using personal, college, my first AOL account from
Crashlytics for monitoring crash reports 1995) varies. Others get dierent social
didnt just help us save face on the day of identities. Others get my phone number.
own Fabric dashboard, were always when I register or log in? Does this app
accepting pull requests. have the ability to post as me, or contact
my friends?
7
Expediency. Exactly how much typing do I but later want them to sign in with a social
have to do one-handed on this 5 screen service in order to share more broadly. Its
just to log into your app? This can be a not uncommon for apps to ask for multiple
major barrier for first time users, and for logins for that very reason.
people who have forgotten their
passwords. From our own experience, here are a few tips
for how best to meet everyones needs:
Sharing data. Is it convenient or a better
experience for me if you have information Motivate the login. Let people know why
about me from another app? Does it save you need them to log in. A simple sentence
me having to type more or fill out a profile like, Sign in to customize your FooBar
(see Expediency)? experience! goes a long way in
persuading people its a good idea. If this
As an app developer, you should probably is their first experience inside your app,
care about: you have to gain their trust. Justify any
requests for data from other services and
Conversion rates. This is the big one. If be crystal clear about why youre doing
people need an account to use your with it.
service, ideally 100% of those who open
your app would create an account. We all Give people options when you can. Earlier,
know the conversion rate is not even close I suggested you identify what information
to that. More on this topic soon. you really need from other services, and
whats just nice to have. Maybe all you
Getting data you can use. What about need is a consistent identifier. In that case,
user identity matters to you: their you can give people a choice of how they
interests? Access to their social graph? A log in, which improves conversion rates all
way to contact them? Distinguish between around. This also opens doors for a
a need and whats nice-to-have and if broader range of people to use your app.
you get their data, be sure that your Not everyone has social media accounts;
customers get some value in exchange. not everyone has an email address. Dont
prevent these people from being able to
Encouraging growth of your app. If you use your app. Weve seen that login with
ask people to share your app with their Digits bumps conversion rates to 85%,
friends, theyll likely share using the same because every mobile user has a phone
identity theyve chosen to identify number.
themselves to you. You may want people
to log in first with their email address,
8
Allow a deferred secondary login. Maybe Decide how frequently you need people
getting started in your app only requires a to log in, and, where appropriate for user
user identifier to save data, but sharing to security, consider using touch-screen
a social network or inviting phone book friendly options like touch ID on iOS, one-
contacts requires a specific type of login. click social buttons, or a custom pattern.
In general, social conversions improve
when you defer the prompt for people to Handle logout gracefully for all
login until the benefit is obvious (e.g., you associated services and sessions. Some
clicked Complete my profile using people prefer to log out of services when
Twitter, so you need to login with Twitter). they arent using them; others may have
multiple accounts in your app that they
want to toggle between. Be sure that
your app handles both scenarios.
Persist sessions sensibly. In some cases, if In fact, Cannonball doesnt even have a
a person is active daily, weekly, or even backend to store identity or the poems
monthly, the activity is enough to keep a people created its all just in a local DB and
session alive. Other apps that require never synced anywhere.
increased security, like banking apps, may
require a login on every open, and end
sessions if the app has been
backgrounded too long.
9
We did this for the sake of expediency, and I can tell this because when I log in from
also sample code readability: when teaching another device or from the web, my
people to use Fabric, we shouldnt make information appears. Just a few years ago,
them learn 3-5 other tools just to get the this felt magical. Remember the first time
sample running. Google Maps automatically put directions on
your phone to the place you just searched on
Furni was intended to demonstrate a more your laptop? Now, its table stakes. Apps
complete, real world app. People could need to store data, and people expect to
browse content before using Digits to create manage and access that data wherever they
an account; later they could include their are.
Twitter handle to contact customer service,
or their email address so the store can send There are so many options for how to
them receipts. We didnt bother writing a structure and build your backend that it
separate email login option; asking the user would be absurd to try and make broad
to let us pull the email address directly from recommendations in a post like this.
Twitter saved us the trouble of building out Backend comprises so many pieces and
an entry form. The app makes use of phone at each level you have tons of choice:
book contacts through Digits, and also programming languages, frameworks,
sharing through Twitter. databases, and unless youre building your
own data centers, or expect to run
So we followed our own best practices, but everything o a machine in your garage
that meant we had a new problem to deal hosting providers.
with: a tangle of optional login identities, and
the requirement that we sync peoples data Making all of these decisions is mostly a
properly across devices. question of taste, skillset, and the balance
between control and flexibility you want on
PART FOUR the infrastructure. At one end you have full
MBaaS (Mobile Backend as a Service)
Creating a backend to
options like Parse (Facebook), Kinvey,
manage services, data, Feedhenry (Red Hat), Azure (Microsoft), and
and identities Cognito (Amazon). These give you easy to
use, native-feeling APIs for storing data to
the cloud, and you dont need to manage any
of the infrastructure directly. On the other
A common theme across the apps on my
end, you have IaaS (Infrastructure as a
phone, apart from oering a way to log in, is
Service) like EC2 (Amazon) or Heroku
that when I save data on them, its persisted
(Salesforce),
somewhere besides just on my device.
10
which give you tighter control over resource we eventually decided to move entirely to
management. PaaS (Platform as a Service) Amazon. We wrote a simple backend in
choices like App Engine fall somewhere in JavaScript using Lambda functions to expose
between. the data from our furniture items stored in
DynamoDB over a JSON API.
PART FIVE
Adding data from third-
party APIs for fun and profit
11
One of my all-time favorite hacks was a Programmable Webs API Directory to get
game where a set of friends each got a push inspired, or Masherys partner APIs and the
notification at a random time of day, and Mashape Marketplace.
competed to take the best photo of what
they were each doing at that moment. PART SIX
Another great project helped people find the Making money from your
perfect vacation by letting them specify
budget and temperature preference, then
mobile app
showing a map of aordable destinations
together with a local Twitter stream, so you
You can begin planning how youll earn
know whats happening in that city or
money from your app even if youre not
country.
ready to implement anything yet. Lots of
successful apps have wildly dierent
Cannonball took a lesson from the first
strategies from freemium models to ad
example start with a simple game, then
support, to direct sales of goods and
make it feel more interesting and current by
services. To decide on the right strategy, you
adding a way to interact with people, live.
need to answer a few questions about your
Cannonball is pretty fun to play once or
app:
twice, when the photos, word bank, and
game mechanics all feel new. But they get
Can you just charge people for it
stale fast, and the fun of games like magnetic
outright?
poetry is sharing the silly things you wrote
with your friends. Adding in a Twitter Are you selling anything, be it physical
timeline with all the poems people shared goods, in-app purchases, or
kept new content in the app, and brought in subscriptions?
some of the feel of an oine game.
Do you have a good place to put ads in
your app?
Furni took it a step further, including a
timeline of curated Tweets about design and
furniture, but also combining the Dot & Bo Theres also an important step 0: be sure
data with a persons contacts list (if they youre in the clear to monetize. The licenses
chose to share it) to show a special feed of for some APIs may prohibit use of their
Friends Favorites furniture. Even if the content in paid apps or in conjunction with
main catalog never changes, that curated list ads. I cant tell you how many hackathon
would probably grow, shrink, and update. projects Ive seen that encounter this issue
because people just dont know, so make
There are so many cool APIs you can use to sure that you have rights to monetize
make your app stand out. Check out anything before getting started.
12
Can you just have a paid app? manage payments and POS systems, and
When I was in college and the App Store was everything else that goes into order
brand new, my dormmate built an app called fulfillment. If you need an end-to-end
Whale Songs. Whale Songs was a slideshow solution, you have great tools like Shopify,
of photos of humpback whales paired with Woo Commerce, Wix, Weebly or Magento.
an audio track of them singing, about three
minutes in a loop. He put it on the store for If youd prefer to handle certain parts
$0.99 late one night, and had made $200 by yourself and use an API only for payments,
morning. Stripe is an awesome choice (and easy to
integrate with Fabric); Braintree, PayPal,
I dont think 200 people would pay a dollar Venmo, Square, MasterCard and Visa all have
for Whale Songs today if 200 people APIs as well. Always check the terms of each
could even find it among the million or so of these providers, since some of them have
other apps out there. But Ive certainly found specific use cases or restrictions.
plenty of apps worth purchasing: ad-free
games like Threes!, utilities like 1Password, The OSes themselves provide payment APIs
and a guidebook app chock full of maps and for handling purchases see the docs for
recommendations that works oine. iOS and Android. Just as with the sale of
paid apps, 30% of the amount paid out will
I bought each of these because their app go to the stores.
descriptions highlighted features that solved
real problems for me. If you can oer people Do you have a good place to put ads in your
a great solution to a problem that they have, app?
you can charge for it. That 30% figure can be enough to turn a lot
of people away from those routes of
Are you selling something? monetizing. Ads can be the easiest option,
When we wrote Furni, some people around and you have a lot of flexibility to do it right.
the oce joked that it looked so good we While ads can be frustrating, the good news
should spin it o into a full time business. We is ad providers are just as incentivized as you
said sure inventory management is the are to provide a positive ads experience to
easy part once youve written a pretty front the people who use your app. Annoyed
end. people dont click on ads. Everyone makes
more money when ads are well designed and
Except, of course, its not at all. There is a well targeted. Thats part of the reason
whole ecosystem of tools that have been behind the rise of native ads.
created to help you track stock,
13
You have a lot of options when it Its a more visually integrated ad
comes to ads: experience, with only a bit more
Banner ads are great for their technical implementation work to lay out creative
simplicity: slap an ad view at the bottom components to match your existing views.
of one of your existing app views, turn on
trac from an ad network or exchange,
and watch people click. Plenty of apps are
able to make money this way, like the
team from Big Duck Games, whose
revenue from banners inside Flow Free
has helped them start living the dream.
14
but up until that point, you had to ship your Double down on social integration
app with client side code determining how When people share content from your app
frequently ads would appear in your list view on social sites, they become your advocates
or table view. Server side positioning was a both for the app and for your brand. Social
change that let you update those values from sharing is free, and can be highly eective. In
the web so we could bake a future ads a survey from ConversionXL, 82% of users
experience into our first release, then turn it said theyd consider trying a new product if
on from the web when the time was right, someone they knew recommended it. The
without needing to ship a new version of the Share Sheet on iOS or a Share Intent on
app to the store. Android are so simple to implement that you
really cant lose.
At the end of the day, dont be afraid to
experiment a little bit. It may take you a little The secret sauce for creating a great sharing
while to hit on the perfect balance of revenue experience is to think about what youd like
sources for your app, but it gets you that to see in a social feed.
much closer to making it a real business.
Which content in your app would you
PART SEVEN yourself click on, reply to, or reshare? Maybe
App marketing for a screenshot featuring your games
incredible graphics, or maybe a surprising
developers headline from a news story. People share to
social networks in the hope that their friends
will like, comment, and interact. Design your
Marketing your app is incredibly important.
sharing experience to encourage that
You can work hard to build the best one
interaction.
possible, but if no one knows about it, can it
really be the best? Marketing encompasses
Use Twitter Cards and Open Graph to make
several pieces: overall product marketing,
your content shine
researching your customers needs, branding
Posts with photos and links with extra details
and positioning, creating a communication
get more real estate in a feed, and are more
strategy, and much more. All of these steps
eye- catching than a plain-text share. When
are critical to your apps success. When you
you include extra information about what
can, hire someone, or a team of someones, to
people are sharing from your app, you ensure
work on these tasks full time.
that it looks its best inside social feeds.
Assuming you havent had any such help yet,
here are some top marketing hacks you can
pull o on your own when launching your
app:
15
Its not a great experience if I click on a clip
from an interview I want to listen to, but
when I open your app, I am only sent to a
main page. Take the time to make the
clickthrough experience great.
Make sure you have deep linking setup become a key part of your strategy to
continue growing. Ads can serve a lot of
Once people begin posting content from purposes: drive people to download your
your app to other sites, you need a way to app, remind people to keep using your app
capture trac back to your app from those (re-engagement ads), and prompt people to
shares. A basic deep link setup could be as do other things that will keep them
simple as adding markup to a Twitter Card to interacting with you, like driving follows to
making sure clicks and taps from Twitter lead your social accounts. Make sure your ad copy
people to the store or open up your app; has a clear call to action, and that you are
check out the instructions for iOS and matching the right ads and right goals with
16
Make re-engagement ads a part updates; or experimenting with new layouts.
of your strategy Often, theres a business goal behind what
It bears repeating that ads can serve a lot of youre doing, whether its explicitly stated or
purposes. Downloads arent the be-all and not. Fixing bugs is a good thing to do for its
end-all of building a successful app. To own sake, but its also key for retention, since
sustain growth, you need people to keep people tend to delete or stop using slow,
using it. Show ads to people who are already crashy apps. Proper internationalization is
using your app to remind them of the value important for adoption because many people
they got from it originally, and to encourage dont use apps that arent available in their
them to come back. country or dont work in their language.
Tweaks in user experience and design can
Experiment with your creative have massive impact on engagement or
After a lengthy brainstorm session, you may purchases.
feel like you have the best possible copy,
imagery, and call to action to get people to Whenever you make significant changes, its
try out your app. But your creative is not a important to keep track of how theyre
set-and-forget process. Its important to A/B aecting the people using your app. Talking
test your copy and creative. The results may to your customers, in person or online, is
surprise you. For example, app install ads always important. Feedback conversations
often perform better when the ad image has provide nuance and details that you cant
real people and a mobile device in it. Even if always capture with a few top-line metrics.
youve got an ad that is doing really well and You can and should use qualitative research
sending a lot of trac your way, its to shape your approach to customers, but
important to refresh your creative and you cant always be in touch with each
messaging so that it remains fresh and segment of people thats using your app.
compelling. Logging metrics about the changes you
make is critical, because analytics are user
feedback at scale.
PART EIGHT
Progressive improvements When youre ready to start moving past your
fixing bugs, or starting to use new tools and Its hard to measure the impact of changes
OS-level APIs; improving load times and you make if you dont know how youre doing
resilience under poor network conditions; to start with. Before going into any
making accessibility and internationalization experiments, you should already know key
numbers like your current DAUs, MAUs,
17
retention rates, and conversion rates on Check the math
events like purchases or social shares (bonus: As in other parts of this series, were
our free analytics tool Answers gives you assuming that youre operating lean and
these stats in real time). dont have a whole data science team behind
you to help create and manage these tests.
Establish a baseline Here are a few important things to keep in
Its hard to measure the impact of changes mind when you do that:
you make if you dont know how youre doing
to start with. Before going into any Make sure you have substantial minimum
experiments, you should already know key sample sizes.
numbers like your current DAUs, MAUs, Whether youre running an A/B test or a
retention rates, and conversion rates on multivariate test, you want your results to
events like purchases or social shares (bonus: be statistically significant that is, you
our free analytics tool Answers gives you want to be clear that the results youre
these stats in real time). observing are due to a real dierence
between the two samples and not just
Decide if your change actually needs to be due to random variation. Think about the
user tested average trac your app or site gets, and
You can safely assume that you should just get a sense of how long its going to take
fix bugs, or just ship a version of your app to collect enough responses to draw a
that works with a screen reader. You should conclusion (1,000 is a reasonable lower
certainly try and measure the eects that bound on responses, but you can use
these types of change have on your business tools like this handy calculator to see
metrics but unless its a significant change what minimum sample you should
to the way your app operates, you may not collect).
need to spend significant time testing it out
first. Pay attention to how daily, weekly, or
seasonal usage of your app can aect
Take the time to actually construct a the sample of people you gather for the
hypothesis to test test.
What do you think might happen after you Most testing methods assume that you
make this change? How will you know that it have a random sample of your users. For
has or hasnt happened? What do you example, if you run your test only during
consider success? Measure the eect you the weekdays, you may be skewing the
think it will have, but also keep an eye on sample set by excluding people who only
your other key metrics you may notice use your app on weekends. Consider
unintended eects alongside the ones you running tests for at least a full week.
were testing. Be careful when running simultaneous
tests.
18
Tests can aect one another, particularly if to the total number of crashes youre
youre running the test with the same observing. Looking at your top level metrics
group of people, and it can be dicult to should give you an instant understanding of
disentangle the results. If you want to run how your app is doing so decide what
tests simultaneously, try to pick matters and choose accordingly. For
independent components of your app to example, a task tracking app may be most
test. concerned with getting people to visit every
day, while a fitness app may care most about
Running a statistically robust experiment workouts completed, and having daily logins
isnt as simple as it looks on the surface. This may not be a reasonable goal.
blog post from ConversionXL gives some
useful details on common mistakes people Daily checks should be quick and simple,
make, including ignoring validity threats, and taking no more than a few minutes of your
increasing chances of false positives by time each day to confirm that everything
testing too many variations at once. A/B looks as it should. When we built the
testing frameworks like Optimizely help take Answers dashboard, we consulted app
a lot of the guesswork out of running tests builders to see what they wanted in their
and bake in some best practices around daily check dashboard. You now see Monthly
measurement and interpretation of the Active Users (MAU), Daily Active Users
results, so you can make better decisions. (DAU), crash-free users, and users in-app so
There are also lots of great tips from around you automatically have the daily check
the web about running robust tests for your level information at a glance.
business.
PART NINE
Analytics and what
to track
20
UI events can be helpful information, but can Repos
also provide a lot of noise be judicious One size doesnt fit all when it comes to how
about how many of these you track so you to organize and manage your code. Multiple
dont get lost in the data. repos may work well; alternatively, there are
also some major benefits to keeping
And if you do feel lost in the data, remember everything in a single, monolithic repo,
scale. If you cant seem to get the initial organization. One size doesnt fit all, and
hunch about what to track, or what might be there may come a time when you have to
aecting your top-line metrics, go and find make changes; expect that to happen
they use it, what they like, what they dont, Youll need to establish a release cadence on
and what confuses them. The better you your team. How often do you cut a new
understand your customers, the easier it will release branch, and how long does it get
be to develop hunches and ideas about their tested before release? Are you doing feature-
behavior that you can test with analytics. based releases or are you sticking to a
regular time interval? Dierent types of
cadence may be appropriate with dierent
PART TEN
team sizes and stages of the product. Be
Streamlining your careful about releasing too frequently; every
workflow time you do, youre asking for action from all
your users to stay updated. Automatic
updates have made this more seamless, but
There are a lot of decisions you need to make you should still keep this in mind. Our
about managing your codebase what kind Android engineering manager Jan Chong
of version control are you going to use? How gave a great talk at Flight about how
do you manage contributions? Who is Twitters thinking evolved on this as our team
responsible for code reviews? Who decides grew.
which changes get merged and how do you
manage the release? All of this is likely to Deploy process
evolve as your team and your code base Youre going to need to set up deploy
grows. What works for a team of four may processes, which may have many moving
not for a team of 60 and vice versa. parts. Unlike on the web, where a deploy is
more or less totally in your teams hands,
21
on native mobile the store aects your build its documentation of how things work, so
process because it has update protocols and everyone on your team knows what happens
timelines you need to conform to. A native in an app deploy, and the code to actually
mobile deploy involves a lot of actions in deploy. You can check the fastfile into source
sequence: control so everyone on the team can use it
and you can produce more consistent results.
Building and packaging your app, which
includes many substeps like committing Fastlane integrates with other CI services
version bumps and managing code and build tools you already use, like Gradle
signing and CocoaPods, and is installed by default on
Handling distribution to beta channels or most major mobile CI providers.
the store Weve put lots of work into fastlane because
we believe in making robust, flexible tools
If youre distributing to the store,
that save us all time. Fastlane is open source
updating your metadata and app
and accepting pull requests and wed love
information like screenshots, as well as
for you to contribute! Whether youd like to
uploading the new version of the
see new third party integrations or you want
packaged app
to build new tools on top of Spaceship, the
Ruby library for connecting to Apples
If youre doing this, youre probably already
Developer Center, wed love for you to share
using multiple tools to get it all done and
it with the community.
that can get messy. Our goal is to simplify
developers lives and save people time, so we
were excited to announce at Flight that
fastlane was joining the Fabric family.
22