Why do we open source our mobile SDKs?
Tags: mobile, sdk, opensource
Published: 2020-03-11 14:11:32

In the Mobile Technology Solutions Department (MTSD) SDK team at Rakuten we used GitPub (internal Bitbucket Server) for hosting our source code and already had Jenkins (a macmini sitting on a developer's [ok, my] desk) for CI so why would we want to open source our mobile Android and iOS SDKs? 

The first mobile SDK we open sourced provides apps with automatic performance tracking. Initially, I thought that if we open sourced our Performance Tracking mobile SDK and our backend source it would result in an open sourced full mobile performance tracking solution and we'd get real outside users of the product. We [did](https://github.com/rakutentech?utf8=%E2%9C%93&q=-perf&type=&language=) open source the mobile SDK however the backend code never got open sourced. It would have been __amazing__ but open sourcing our backend code was always going to be more challenging than doing it for the mobile SDKs - although we could still do it! 

Although nobody (that we know of) outside of Rakuten is using the Performance Tracking SDK in their production apps there were still a number of strong benefits that we got from open sourcing the SDK and, more recently, our other mobile SDKs - especially when it comes to CI on iOS!

By open sourcing our mobile SDKs it:

* Allows us to use modern tooling, like GitHub for source code and [API docs hosting](https://rakutentech.github.io/#/filter/-perf), and [Travis](https://travis-ci.org/rakutentech) or [CircleCI](https://circleci.com/gh/rakutentech/android-miniapp) for CI tests and automation
* Increases customer confidence in our code - they can read it if they want to!
* Makes developers happy because we love to work on open source 😍
* Allows contributions (issues/PRs) from users
* Increases mobile community recognition for MTSD and Rakuten, and attracts potential employees
* Allows developers to point to open source contributions on their online profiles and resumes

![that'd be great](https://i.imgur.com/7zhX1vm.png)

An increasing number of tech companies open source their mobile SDKs including Dropbox, Google, Adjust, Mapbox etc. It is now close to being a standard practice in the companies that offer mobile SDK products.

So far our team has open sourced the following mobile SDKs
* https://github.com/rakutentech/android-miniapp 
* https://github.com/rakutentech/ios-miniapp
* https://github.com/rakutentech/android-remote-config 
* https://github.com/rakutentech/ios-remote-config
* https://github.com/rakutentech/android-perftracking 
* https://github.com/rakutentech/ios-perftracking

Our Remote Config SDK was __developed completely in the open on GitHub__ from the initial commit, and our MiniApp SDK is also being built in the open on GitHub.

We've also open sourced [build config](https://github.com/rakutentech/android-buildconfig), [utility](https://github.com/rakutentech/android-sdkutils) [libraries](https://github.com/rakutentech/ios-sdkutils) and developer [tools](https://github.com/rakutentech/macos-push-tester).

I hope that in Rakuten MTSD we continue our commitment to open sourcing our mobile solutions, and going forward I want to see us contributing back to open source projects too.

Oh, and you might be wondering what the process is to open source something in Rakuten. It’s actually pretty easy...

1. Document the Project
2. Consult with Legal
3. Approval from Management
4. Prepare Source Code
5. Publish on GitHub 🥳
6. BOOM 💥