Zum Hauptinhalt springen

Technologies in our iOS stack

· 5 Minuten Lesezeit
Oscar Sanchez Ayala

The WHOOP iOS team is composed of knowledgeable engineers with a broad range of skills and iOS technology expertise.

We use a variety of different technologies, ranging from Bluetooth to GameKit, in pursuit of building a world-class experience for our members.

banner

Here are a few examples of the technologies we use in the WHOOP iOS App:

Custom Views

Whenever the Product team presents a new feature design, we often think about a native iOS control to use. Most of the time, we have to create custom components that fulfill the requirements. This is an opportunity to show our creativity and passion while also building something reusable and configurable. As you can imagine, most of the UI elements of the WHOOP iOS App are custom components that the iOS engineers have put a lot of energy into refining.

Bluetooth Low Energy (BLE)

Bluetooth Low Energy is a powerful, fascinating, fast, and reliable technology. We use it to transfer data over the air from the WHOOP strap to the iPhone. We also use it to upgrade the Firmware of the strap by sending the payload from the iPhone to the strap using the WHOOP BLE Protocol.

GPS

If your passion is tracking routes using the Kalman algorithm, or maybe you have a cool algorithm that can smooth routes, we have a team that is tackling these problems. During an activity recording, we track the route for some sports, and based on the locations received from the iPhone, we trace a live route and calculate the distance and the speed or pace for running activities.

Core Animation

iOS Animations play a fundamental part in any application and are essential to offering smooth transitions. We use animations to explain to our members how to use the strap and understand the metrics we show in the app. You can find other examples in the Firmware Update process, Strain Coach, and WHOOP Teams, to mention a few. If your passion is to create amazing animations, the WHOOP iOS app has many of these challenges.

Protocol-Oriented Programming (POP)

If your passion is to create granular designs, the WHOOP iOS App is focused on using Protocol-Oriented Programming (POP) so we can take advantage of supporting multiple implementations, enabling flexibility to conform to more than one protocol, etc. One example is the Journal feature and the migration we recently released with the new navigation bar. Before enabling this new feature, we had to keep the old navigation working, which was achieved by using the POP paradigm.

Model-View-ViewModel (MVVM)

Model-View-ViewModel is the design pattern we are pushing towards going forward. It allows us to extract business logic from our view controllers and add an extra layer of testing (i.e., unit tests for the view models) to ensure the app behaves as expected. It also fits with new Apple technologies like SwiftUI and Combine.

Core Data

Persisting data in the WHOOP iOS App is important to use the resources of the iPhone efficiently and to offer a snappy experience. Core Data allows us to cleanly manage the network or Bluetooth outages since we have an elegant caching model. An example here is when a member needs to look back in their history. The app doesn’t need to hit the API again, reducing latency.

Apple Push Notifications

The WHOOP iOS app uses both audible and silent push notifications to notify the users about actions to take like charging the strap because the battery is low or to be ready to go to sleep. We also notify the user that we have finished processing activities or when they receive an invitation to join a team.

With universal links, the WHOOP iOS App can direct users to specific parts of the app. One example of this is the WHOOP website list of joinable teams. When you tap on one of these team links on your phone in a web browser, the iOS app will automatically open the Join Community option for that team, so the redirect is imperceptible.

Grand Central Dispatch (GCD)

Grand Central Dispatch plays a fundamental role in the WHOOP iOS App. We can handle multithreading, schedule tasks that need to be executed at specific times, concurrency, and also use NSOperations to complete complex processes that require dependencies.

Continuous Integration Automation

UI testing and unit testing are critical to detect issues before we release a new version to our members. At WHOOP, we have an efficient continuous integration and rapid automated deployment process scheduled daily. We also have an automated process to release to the App Store every week to maximize member value.

Feature Flags

The WHOOP iOS app can enable or disable features seamlessly by using the development technique of Feature Flags. Releasing a new feature requires the effort and synchronization of many teams like Product, Marketing, and Membership Service, and using this technique, we can gradually roll out features for our members.

GameKit

Yes, you read that right. The WHOOP iOS app uses GameKit to create robust state machines that can handle complex processes. You can find examples of how to use it in the mechanics of pulling metric data off the strap, the pairing process, and firmware update.

If you are interested in being part of the iOS Team at WHOOP, check out our open positions