Split Testing (A/B Testing) with Swift
Article Summary
Alexander shows how a simple A/B test doubled in-app currency purchases from 2% to 4% at Badoo. Here's how to build the same testing framework in Swift.
With millions of apps competing for attention, companies like Badoo run multiple split tests simultaneously to validate features. This article walks through building a client-side A/B testing framework in Swift, complete with persistent storage and analytics integration.
Key Takeaways
- Build client-side Swift A/B testing without external servers or dependencies
- Protocol-based architecture uses enums, UserDefaults, and analytics integration
- Real test doubled purchase rate: 2% baseline to 4% with optimized difficulty
- Framework designed for sub-1-minute setup time for new experiments
A lightweight, protocol-driven Swift framework enabled rapid experimentation that doubled conversion rates from 2% to 4%.
About This Article
Badoo wanted to figure out which UI changes would actually get users more engaged. They had an old profile design and two new versions they wanted to test at the same time across different groups of users.
Alexander created a Swift framework based on protocols called SplitTestProtocol and SplitTestGroupProtocol. It saves which group each user belongs to in UserDefaults and connects to analytics tools. The whole thing lets you run a new test in under a minute.
When they tested different difficulty coefficients for in-app currency purchases, conversion went from 2% up to 4% once they applied the optimized coefficient.