1. Download the Clutch A/B Testing Framework for iOS
Download the Clutch iOS Library
zip file and extract it.
Now drag the Clutch.framework folder into your project:
Choose the option to "Copy items into destination group's folder":
Since Clutch relies on sqlite, add that to your linked frameworks as well:
2. Set up the A/B Testing Framework in Your App Delegate
In your #import <Clutch/ClutchAB.h>
In didFinishLaunchingWithOptions add the following lines:
// Set up Clutch A/B testing
[ClutchAB setupForKey:@"{{ app_key }}" rpcURL:@"http://127.0.0.1:41674/"];
3. Start A/B Testing!
Now you’re set up to run A/B tests, and you can start adding as many tests as you want to your app. Here’s an example:
[ClutchAB testWithName:@"loginButtonColor" A:^{ self.navigationItem.rightBarButtonItem.tintColor = [UIColor redColor]; } B:^{ self.navigationItem.rightBarButtonItem.tintColor = [UIColor greenColor]; }];For more information, visit our iOS A/B testing docs.