Updating live mobile apps is impossible a pain.
Software development has really advanced in the past couple of decades. We’ve gone from shipping software on CDs to Software-as-a-Service and from release cycles of months or even years to weeks or days (or even hours). With the rise of mobile apps, the release process has unfortunately taken a step backward in some aspects. We’re back to “shipping” software to users, though at least now you just need to download it from the App Store or Google Play instead of opening a box with a CD in it. As a mobile app developer, you no longer have direct access to your production code. This articles provides a list of tools that puts you, the developer, back in control of live apps in production by being able to update your app instantly, without going through the App Store or Google Play.
iOS vs Android Apps
The reasons for wanting to update mobile apps in real time are much different for Android and iOS apps. In the iOS world, the review times for the App Store are much greater than Google Play (who introduced manual Android app reviews back in March 2015). In the iOS world it can take days or even weeks to get an updated app approved, while with Google Play, you’re usually looking at a few hours. iOS developers are pretty vocal about their frustration with the delay and are overall disgruntled about the App Store review process. There’s even a template gallery and document generator for Apple's expedited review request process called Dear Apple. Very recently Apple has indeed improved review times, with users reporting app review times of less than 24 hours, though the main issue of not having direct access to live apps still exists. In the Android world, the issue is supporting the fragmentation of OS versions and devices. Perfecto Mobile (a mobile testing company) has over 50 Android devices they support and Open Signal’s Android Fragmentation Report shows 24,093 Distinct Android devices seen in 2015. It’s almost impossible to test every single device / OS combination so there is a good chance bugs or UI issues will fall between the cracks. Ideally, you’d be able to deploy an update just to the affected users until the next scheduled app update.
What’s in it for me?
In case you’re wondering why you need to be able to update your app in real-time, here are a few common few scenarios, all of which can be accomplished with the tools below. I’m sure you’ve probably encountered some of them:
Fix bugs This is probably the #1 pain developers talk about. Yes, it is possible to fix a bug remotely (hotfix apps). I’m not talking about turning off a new feature with feature flagging. I mean updating the live app code or data so it works. Add logging on the fly or augment existing logging Trying to track down a bug that you can’t reproduce in the lab and only happens in the wild? Wouldn’t it be cool if you could selectively decide what to log and what not to log? Or even turn on or off logging to specific devices segments in real-time? Yup, there’s an SDK for that :) Update configuration data Want to change some of the variable values in your app? For gaming apps, this is already considered a best practice. For example, updating the difficulty level of a game without waiting for an App Store review. Many Mobile-backend-as-a-service companies provide this feature. Add or modify analytics tracking Two common scenarios: (1) You are already tracking an event or some data, and your marketing manager wants to send the data into a new analytics tracking service (2) You want to start tracking something you don’t already have any tracking code for. For example, are people using your email app in landscape or portrait mode? Force (or ask) user to update the app You want to make a non-backwards compatible to your app’s backend, but what about users who don’t update? Ideally, let them know a while in advance (ask to update) and then force them to (can’t use the app anymore). Personally, I was really annoyed when my Uber app forced me to update, but as a developer, I understand sometimes you need to stop supporting old stuff. Turn features on or off Also known as feature flagging or feature toggling. Essentially, this is just a binary flag that is used to to decide what code runs on which devices. If your needs are very simple, you can use any tool that provides dynamic variables and just change the flag value as needed. If you have complex rules and user segments, such as “only show this feature to users who have a VIP account” or “release this feature just to 2% of all users”, then you should look into one of the tools that specifically supports feature flagging. Security updates & controlling third party SDKs Just found out that a third party SDK is collecting private data? Sounds like you need to update your app. Looking at the list above, there isn’t a clean division between what each tool can do. In fact, there is quite a bit of overlap between them. Still, I segmented the tools into the following categories based on my impression of their core purpose, which is usually what they started with before adding more functionality:
Code Level Updates
A/B Testing
Feature Flagging
Configuration Management
Data Flow & Analytics
CloudBees Feature Management.io Platforms: iOS only CloudBees Feature Management is quite different from the rest of the tools covered and requires a bit more explanation. CloudBees Feature Management lets you inject JavaScript code into your native app. This JS code (which they call a patch) can override any existing native (Obj-C or Swift) code methods and fully interact with your existing app code. When patching Obj-c apps, CloudBees Feature Management utilizes iOS’s built in Obj-C <-> JavaScript bridging magic. When patching Swift apps, CloudBees Feature Management uses code instrumentation to create pseudo method swizzling in Swift. Either way, being able to remotely override existing methods gives you a way to update just about anything in your app in real-time. Even though many people think you’re not allowed to do this, it’s 100% legit (Apple’s guidelines allows you to load and execute JavaScript in your native app). The coolest thing about CloudBees Feature Management is that you do not need to modify any existing code for it to work. This means you don’t need to think about what you want to change in advance. CloudBees Feature Management is ideal for fixing bugs or for simple feature flagging. It can even be used for A/B split testing, though you’re probably better off using a dedicated mobile split testing tool if that’s your main need. CloudBees Feature Management also stands out from the rest of the tools included in that you can define exactly what patches are applied to which version of your app. For example, if you have three live versions of your app, let’s say 1.2, 1.3 and 2.0, each version gets its own patches. I didn’t see any way to modify just a specific app version with the other tools.
While most of the tools in this group (and I’m sure I missed a few) are primarily focused on the needs of the marketing or product team, not developers, I am including offerings that have some developer focused functionality such as feature flagging or remotely configurable variables. Apptimize Platforms: iOS & Android Apptimize started as a mobile first split testing tool. Later on, they added a product called “instant update” which is effectively the same as a split test but where everyone sees just the new version. This is great in instances where you need to make a change to the app’s UI but doesn’t help if you need to make any logic changes. Recently they’ve also added feature flagging which can also be used for gradual feature releases. For A/B testing it’s pretty much plug & play, but in order to use feature flagging you’ll need to modify your app code before submitting it to the app store. Optimizely (Mobile) Platforms: iOS, Android and Web Optimizely also started out as a split testing tool, though they started out for the web and added mobile support much later. Optimizely also can be used for “instant updates” and for feature flagging (they call it code blocks). They also have a feature called “live variables” which lets you define variables in your app code that can be updated from the Optimizely interface. Leanplum Platforms: iOS, Android and Web Leanplum is a mobile first offering, that includes personalized messaging, UI changes and A/B testing. Their feature to dynamically update variables is simply called “custom variables”. Taplytics Platforms: iOS, Android and Web (JavaScript) Their website says “Taplytics is a fully integrated mobile A/B testing, push notification, and analytics platform providing the tools you need to optimize your mobile app”. The docs say “Taplytics Variables are dynamic variables that can be used to change content or functionality of your app dynamically from the Taplytics website. Variables are re-useable between experiments and are defined by their name and a default value that is used when there is no internet connection or when variables are not attached to any experiments.” Swrve
Platforms: iOS & Android Swrve provides A/B testing, push notifications, targeted in-app messaging, analytics, and a couple of other cool features. Swrve’s ability to define dynamic data is called “Resources”.
Launch Darkly Platforms: Web & Many languages, iOS (beta) Launch Darkly is primarily a web-based feature flagging company, though they do have an iOS SDK in public beta. They also have basic A/B testing and simple analytics included in their higher end tiers. Their A/B testing is essentially sticky randomized feature flagging, so it’s up to you to implement any differences between versions A and B.
LaunchKit Config Platforms: iOS & Android Their website says “LaunchKit’s Cloud Config lets you adjust settings and features in your app, even after it's already installed on your users' devices.” Basically, you can define data (variables) in your app and push updated values to your app. It’s still up to you to decide what the app does with the data. Google Tag Manager for Mobile Platforms: Web, iOS & Android GTM started as a web-only solution for tag management and added mobile support in Dec 2013. It’s a viable solution for configuration management and dynamic analytics tagging. Considering that it’s FREE, I’m kinda surprised it’s not used by more people. For apps with zillions of users, free is a huge advantage.
A note about analytics tracking Segment, mParticle and Google Tag Manager all allow you to dynamically send events you’re already tracking to multiple analytics services, but you can’t add tracking for something you didn’t think of before you launched your app. Mixpanel provides some pretty cool codeless event tracking which makes it easy to dynamically add tracking for UI based events. CloudBees Feature Management (mentioned earlier in this article) goes one step further by letting you add analytics tracking to any method in your code, provided you already have any analytics tracking SDK in your app. Mixpanel Platforms: Web & Many languages, iOS & Android Mixpanel originated as an analytics solution with a heavy focus on mobile. They later added A/B testing which can easily be used just to push UI updates to your app. They also have what they call tweaks which are basically variables that can be updated remotely and can be used for feature flagging or for configuration management. Segment Platforms: Web & Many languages, iOS & Android Their website says “Collect customer data with one API and send it to hundreds of tools for analytics, marketing, and data warehousing.” Segment started as a web and back-end language solution to dealing with the constant need to add a new analytics or tracking provider. They’ve added mobile support pretty nicely and are used by quite a few large apps. mParticle Platforms: iOS & Android Their website says “Collect customer data once and send it to any analytics, marketing, and data warehousing platform.” Similar to Segment, but unlink Segment, they are only mobile. -- Note: Segment and mParticle aren’t for updating your app in real time per-se, but they do address the issue of managing analytics providers and controlling mobile app tracking data flow without the need to update your app. If you’re debating between Segment and mParticle, you should read this article about the differences between Segment & mParticle
, though keep in mind it’s from Oct 2014.
Can’t I do this on my own with open source tools?
You might have noticed I did not include open source tools, but rather just listed SaaS offerings. The very nature of remote updates means there needs to be a cloud hosted element in the mix. As such, you can definitely roll your own solution and utilize some open source code, but you’ll also need to support some back-end server side element. Just saying … If you are looking for something in the open source world (not just updating live apps), you should definitely check out https://github.com/vsouza/awesome-ios, a curated list of awesome iOS frameworks, libraries, tutorials, Xcode plugins, components and much more. The vast majority of libraries and frameworks listed are open source projects.
What About JavaScript Frameworks?
While this article is about native apps, it’s worth mentioning one huge benefit of using a JavaScript frameworks such as React Native, Meteor and Trigger. With JavaScript frameworks, you can simply deploy a new version of your app directly to end users. I’m not talking about pushing a patch or updating a dynamic variable value, but the actual app code. Many of these frameworks provide an update service such as Apphub.io (React Native), Trigger Reload and Meteor Hot Deploys.
Hey, you’re missing an SDK our marketing team uses.
The goal of this article is to help developers with their day-to-day needs, not marketing teams. There are countless SDKs that help marketing teams deliver the right message to the right person at the right time, but once they are installed, it’s usually the marketing team that uses the service, not developers. Some examples are: Clevertap, Insert.io, UrbanAirship, Intercom, Elasticode, Apptentive, If you know of any tools or services you think should be included here, just let me know