Case Study

Major League Soccer - Extending React Native capabilities by adding native extensions

Major League Soccer logo
Callstack made the perfect staff augmentation partner. Their engineers were well versed in all things React Native and proved to be a crucial part of our mobile app relaunch project.
Brian Aznar
Engineering Director of Major League Soccer
Introduction

The official app of Major League Soccer that keeps you connected with the latest soccer news, schedules, match highlights, live scores and standings

The client had a conventional mobile application for platforms – iOS and Android. They decided for a complete restart with a brand new design. The client built a prototype in React Native just to prove that this idea might be correct. Then we joined the project to help make this dream happen. We have been there from the very beginning to help solve the various issues which came along with the React Native project where we have a strong level of expertise.

cover
Problem

How to deliver a great user experience across the different platforms and reuse as much code as we can

As the client introduced us to their app, customers, and requirements, we had to make decisions about crucial points of the future app:



  • The project structure
  • Which navigation solution should we use
  • Do we have the necessary tools for custom features? (Video player, Chromecast)
  • Tech stack reuse (client already had a website with backend)
  • Communication with a less technical group (designers, testers)


The application had to be ready for various resolutions – it needed to support tablets and mobiles. Also, because the new design of the app contains impressive and sophisticated gesture and controls, we had to come up with a good abstraction – a declarative animation approach.

application application application
Solution

Keep it native where you need to and go for JavaScript where you can

application

Since we knew that the app is going to be pretty complex and demanding, therefore, we decided to implement and use many native modules. The first thing was the navigation. We knew that having JavaScript based navigation would be an overkill to the app of this size, that’s why we decided to go for native-based navigation.

Our client already had working solutions to handle things like video playback and push notifications on the native side, so we decided not to force them to change their current approach, but rather port their current solutions to the JS world as native modules.

Brightcove Player

We’ve created a private implementation of Brightcove player to match the needs of our client, including additional functionality, for example, stopping background music to let the user listen to video sound only.

application

Brownfield solution for
Video Gallery Screen

Another solution created for the video gallery is its Brownfield equivalent – a full native screen embedding React Native inside it. We recreated native video gallery using Kotlin for Android and Swift for iOS. Then, we embedded the React Native view inside of it, to let it control video from within JavaScript.

This approach allows having updates to your application, without the need for sending it to the Store for review (thanks to OTA (Over the air) updates for React Native).

Code Reusability

React Native gives the great opportunity of combining the power of native code and the composability of React components and we managed to benefit from this.

Our client had a working website written in React and a GraphQL based backend. The client side was using react-apollo, which allowed us to handle all of the communication with the API and state management via GraphQL higher order components and also reuse some code from the website.

Auto Deploy solution

We also knew that we’d be working with a team of less technical people like designers, testers and product owners. It was clear to us that we need a great continuous integration and delivery system, so everyone had a clear idea in what shape the app is.

application
application

We set up an environment that is friendly for both developers and the other team members. As soon as pull requests pass the checks and are merged to the main branch, our alfa deployment tasks are invoked – and soon deployed and distributed via the App Center to testers (notifying them along the way).

application

We have also implemented Google Analytics and Crashlytics to precisely measure the app's performance. Finally – we managed to profile the app via the native IDEs, eliminate the bottlenecks and submit the app to AppStore and Google Play.

application
Outcome and Benefits

Performant cross-platform application with components shared across the stack

We’ve helped our client to successfully deliver the app for both platforms, meeting the deadline.

MLS in AppStore
MLS in Google Play

Overall, the launch was really successful – our client was happy with the outcome and the cooperation and app users are happy with our work.

Let's work together

Need help with React or React Native? Let us know!

ń