Badoo Alexander Jul 4, 2018

Split Testing (A/B Testing) with Swift

Article Summary

Alexander from Bumble's engineering team built a client-side A/B testing framework in Swift that takes just 1-2 minutes to implement per new test. No server infrastructure required—just protocols, generics, and smart dependency injection.

This technical deep-dive walks through building a production-ready split testing system for iOS apps using Swift protocols and generics. The framework handles random group assignment, persistent storage, and analytics tracking while maintaining type safety. Bumble used this approach to test profile redesigns across millions of users.

Key Takeaways

Critical Insight

A Swift-native A/B testing framework that balances implementation speed with production reliability, proven at scale on Bumble's iOS app.

The article includes a complete working implementation on GitHub and reveals how difficulty coefficients in a game doubled purchase conversion rates from 2% to 4%.

About This Article

Problem

Badoo needed to test which UI changes actually improved user engagement across millions of users. They couldn't rely on server infrastructure, and failed experiments risked delays in App Store rollbacks.

Solution

Alexander built a Swift framework based on protocols. It used SplitTestProtocol, SplitTestGroupProtocol, and SplitTestingService. The framework stored data in UserDefaults and injected analytics as a dependency, which made group assignment type-safe.

Impact

A game currency test showed clear differences. Users with no difficulty coefficient had a 2% purchase rate. Those with a small coefficient reached 3%. The large coefficient group hit 4%. The results proved that split testing could identify changes that lifted revenue.