For the complete documentation index, see llms.txt. This page is also available as Markdown.

ABTasty QA Assistant

This package allows QA teams and developers to easily test campaigns, force variations, and verify flag values in real-time within iOS applications. Using ABTasty QA Assistant

Table of contents

  • Overview

  • Features

  • Prerequisites

  • Installation

  • Quick Start

  • Detailed Integration

    • Initialize Flagship SDK

    • Setup QA Assistant

    • Display Overlay Button

    • Live Flag Updates

  • Key Features

  • Best Practices

  • Troubleshooting

  • Additional Resources

Overview

The ABTasty QA Assistant provides an intuitive in-app interface for testing A/B campaigns, feature flags, and variations during development and QA phases. It integrates with the Flagship iOS SDK to provide real-time flag updates and comprehensive campaign management, presented as a draggable overlay button and a bottom-sheet panel.

Production Warning: Do not ship this package to production! The QA Assistant is intended for development and QA testing only.

To prevent accidental inclusion in production, wrap initialization in a #if DEBUG compile-time check. Since this is a compiler directive, the QA Assistant code is stripped out entirely from Release builds:

Features

  • 🎯 Campaign management - View, test, and force variations for A/B tests and feature flags

  • 🔄 Live flag updates - Real-time flag value changes when forcing variations

  • 📊 Allocation viewer - Check traffic distribution across variations

  • 🔍 Targeting inspection - Verify targeting rules and conditions

  • 📈 Event tracking - Monitor all hits (events, screens, transactions) sent to Flagship

  • 🧭 Context viewer - Inspect the current visitor context

Prerequisites

Before integrating the ABTasty QA Assistant, ensure you have:

  • Xcode with a project targeting iOS 15.0 or higher

  • An ABTasty account with:

    • Environment ID

    • API Key

  • The Flagship iOS SDK ~> 5.0.0-beta installed in your project

Installation

ABTastyQAssistant is distributed via CocoaPods and Swift Package Manager.

CocoaPods

Add both the Flagship SDK and QA Assistant to your Podfile:

Then run, from your project's root directory:

Always open the generated .xcworkspace file (not the .xcodeproj) afterwards.

Swift package manager

Add the package to your Package.swift, or via Xcode's File > Add Package Dependencies…:

Then add "ABTastyQAssistant" to your target's dependencies.

The Flagship SDK's module is named FlagShip when installed via CocoaPods and Flagship. When installed via Swift Package Manager use the import that matches your installation method (see the Quick Start example below).

Quick start

Get up and running in 5 minutes with this complete example:

1

Replace your credentials

Replace these placeholders with your actual values:

  • YOUR_ENVIRONMENT_ID - Your Flagship environment ID

  • YOUR_API_KEY - Your Flagship API key

2

Copy & Paste this code

3

Run your app

Build and run your app on a simulator or device.

4

Use the QA Assistant

  • Tap the bug icon in the navigation bar (top-left)

  • The QA overlay button appears, floating above your content, drag it anywhere on screen

  • Tap the overlay button to open the QA Assistant bottom sheet

  • Browse campaigns and force different variations

  • Watch the flag value update live when you select variations

Detailed integration

1

Initialize Flagship SDK

2

Setup QA Assistant

Initialize the QA Assistant with your credentials:

3

Display overlay button

Show the floating overlay button on top of a UIViewController:

Add a button in your navigation bar:

4

Live Flag updates

Enable live flag updates to automatically refresh your UI when flags are modified through the QA Assistant:

Important: Register the listener before fetching flags, so the very first fetch (and any subsequent QA-triggered update) is caught:

Key features

Campaign management

The QA Assistant provides a comprehensive interface to:

  • View all campaigns - See active, inactive, and forced campaigns (A/B tests, toggles, personalizations)

  • View variations - Explore different variations for each campaign with all associated flags

  • Force variations - Override the default allocation and test specific variations

  • Reset to original - Return to the production variation with a single tap

  • Hide / show campaigns - Temporarily disable a campaign for the current session

  • View allocations - Check traffic distribution across variations

  • Check targeting - Verify targeting rules and conditions

See Using ABTasty QA Assistant for more information.

Live Flag updates

Real-time flag value changes when you force variations through the QA Assistant:

Comprehensive views

  • Campaigns Tab - Browse every campaign, its status, and the currently allocated variation

  • Variations Tab - See all flags and their values for each variation of a campaign

  • Allocation Tab - View traffic distribution percentages across variation groups

  • Targeting Tab - Check targeting rules and audience criteria

  • Events Tab - Monitor hits (events, screens, transactions) sent to Flagship in real-time

Context management

  • Context Tab - See all context key-value pairs for the current visitor

Best practices

1. Initialize in Debug Mode Only

Only enable the QA Assistant in debug/staging builds. Wrapping the code in #if DEBUG removes it entirely from Release/App Store builds:

2. Always dispose properly

Clean up resources when the presenting view controller is deallocated:

Troubleshooting

Issue: Overlay button not showing

Solution: Make sure you call showOverlayButton(in:) with a UIViewController whose view is already attached to a window (e.g. from viewDidAppear, not before the view hierarchy is set up):

Issue: Flags not updating after forcing a variation

Solution: Ensure the flag update listener is registered before the first fetchFlags call:

Issue: "Allocation has been bypassed" message

This is expected when you force a campaign. The allocation is bypassed because you've manually selected a variation instead of letting the normal traffic allocation decide. This is working as intended.

Issue: QA Assistant compiled into a production build

Make sure to wrap QA Assistant code in #if DEBUG checks:

Consider using a separate CocoaPods target, or a build configuration that excludes the ABTastyQAssistant pod from your Release build, to fully exclude the package from production builds.

Additional Resources

Example application

A complete demo application is included in the Example/ directory. To run it:

Then build and run the ABTastyQAssistant-Example scheme from Xcode.

The example demonstrates:

  • Complete Flagship SDK integration

  • QA Assistant setup and teardown

  • Live flag updates

  • Multiple flag types (string, number, VIP-targeted flags)

  • Context updates and hit tracking (screens, events, transactions)

Last updated

Was this helpful?