-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Joseph Samir edited this page Jun 21, 2026
·
4 revisions
The Convert iOS SDK brings A/B testing, feature flags, and personalization to native iOS, iPadOS, tvOS, and macOS applications. It resolves experiment and feature decisions on-device from a cached bucketing config, then batches, persists, and flushes tracking events — including after the app is suspended or terminated — over a background URLSession so nothing is lost when the network is unavailable.
Source Repository: ios-sdk
flowchart TD
A0["ConvertSwiftSDK (init)"]
A1["ConvertContext"]
A2["ConfigStore / DataManager"]
A3["RuleManager"]
A4["BucketingManager"]
A5["ConfigFetchService / EventQueue"]
A6["FeatureManager"]
A7["EventBus"]
A8["iOS adapters (URLSession / Keychain / UserDefaults)"]
A9["BackgroundSessionManager / LifecycleObserver"]
A0 -- "Creates" --> A1
A0 -- "Fetches config via" --> A5
A0 -- "Wires" --> A8
A0 -- "Fires events via" --> A7
A1 -- "Runs experiences via" --> A4
A1 -- "Runs features via" --> A6
A1 -- "Reads config via" --> A2
A1 -- "Gates with" --> A3
A1 -- "Enqueues tracking via" --> A5
A5 -- "Persists offline via" --> A8
A5 -- "Schedules retry via" --> A9
A6 -- "Buckets via" --> A4
A2 -- "Fires events via" --> A7
The iOS SDK shares the same bucketing algorithm as the JavaScript SDK, so variation assignment is deterministic and identical across SDKs. It is adapted for the Swift/Apple runtime:
-
Initializer, not builder —
ConvertSwiftSDK(configuration: ConvertConfiguration(sdkKey: "..."))replaces the Androidbuilder(context).build()pattern.ready() async throwsgates your first decision call instead of anonReady { }callback (a callback overload exists for UIKit-style call sites). -
Swift concurrency — Config fetch, event flush, and all SDK state are actor-isolated. Every public API is
async; completion-handler twins are provided for non-async call sites. -
Apple platform adapters —
URLSessionfor HTTP, Keychain for visitor-ID persistence,UserDefaultsas a mirror, a coordinated file store for the offline event queue, and a backgroundURLSessionfor post-suspension delivery. -
Offline-safe by design — Events queue durably to disk and flush via a background
URLSessionwith background task support; a lifecycle observer triggers persist-on-background and flush-on-foreground. -
Privacy-aware — The default visitor ID is a UUID persisted in the Keychain under
ThisDeviceOnly(no IDFA, no IDFV, no iCloud Keychain sync). An uninstall may surface a fresh visitor ID; continuity across reinstalls is best-effort only. -
Typed Swift models — Decisions return Swift types (
Variation,Feature) and enums (FeatureStatus,LogLevel); feature variables useConvertValuewith typed accessor methods. -
No Objective-C interop surface — The public API is Swift-only; there is no
@objcbridge.
- How Convert Works
- Architecture Overview
- Data Model Reference
- Quickstart Overview
- Requirements & Constraints
- Quickstart
- Installation
- Initialization
- Configuration Options
- Return Types & Models
- Code Examples
- Offline Behavior
- Tracking Control
- Apple Privacy Manifest
- Experiences & Variations
- Feature Flags
- Bucketing Algorithm
- Rule Evaluation & Targeting
- Segments
- Data Management
- Event System
- API Communication & Tracking
Copyrights © 2026 All Rights Reserved by Convert Insights, Inc.
Getting Started
iOS SDK
- Quickstart
- Installation
- Initialization
- Configuration
- Return Types & Models
- Code Examples
- Offline Behavior
- Tracking Control
- App Privacy & Data Collection
- Objective-C Interop
Core Concepts
- Experiences & Variations
- Feature Flags
- Bucketing Algorithm
- Rule Evaluation
- Segments
- Data Management
- Event System
- API Communication
How-To Guides
- Running Experiences
- Running Features
- Tracking Conversions
- Visitor Context
- Persistent Storage
- Troubleshooting
Contributing