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
- Client-side framework eliminates server dependency but prevents rollback without App Store updates
- Protocol-based architecture with generics enables type-safe group assignment and analytics
- Control and control_check groups validate that metric changes come from the test
- Real example: Bumble tested 3 profile variants simultaneously with equal user distribution
- Hit tracking ensures users actually saw the test before counting them in results
A Swift-native A/B testing framework that balances implementation speed with production reliability, proven at scale on Bumble's iOS app.
About This Article
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.
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.
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.