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

OpenFeature Provider for iOS SDK

Integrate OpenFeature with Harness FME in your iOS applications to evaluate feature flags, manage contexts, and track events using a standardized SDK.

Integrate your iOS applications with Harness FME using the iOS OpenFeature Provider, a standardized, vendor-agnostic feature flagging API. This provider implements the OpenFeature specification and bridges the OpenFeature SDK with the Harness FME iOS SDK.

This page walks you through installing, configuring, and using the iOS OpenFeature provider to evaluate feature flags in your iOS applications.

Before you begin

Before you begin, ensure you have the following:

  • A valid Harness FME SDK key for your project

  • An iOS project (Xcode 14+)

  • Access to your project's Package.swift file or Xcode project to add the provider dependency

Version compatibility

Component
Minimum Version

iOS

≥ 14

@splitsoftware/split-openfeature-provider-swift

≥ 1.0.0

OpenFeature Swift SDK

≥ 0.4.0

Install the provider and dependencies

Add the Harness FME OpenFeature provider dependency to your application's Xcode project using Swift Package Manager.

.package(url: "https://github.com/splitio/split-openfeature-provider-swift", from: "1.0.0")

Initialize the provider

The Harness FME OpenFeature provider requires an iOS application Context (for SDK initialization) and your Harness FME SDK Key.

Construct an evaluation context

Provide an evaluation context with a targeting key to evaluate flags. The evaluation context passes targeting information such as user IDs, email addresses, or plan types for flag targeting.

For example:

To set a targeting key during initialization:

To change a targeting key at runtime:

Observe provider events

The Harness FME OpenFeature provider emits events when provider state changes (for example, when flags update, configuration changes, or errors) occur. You can observe these events to update your application's behavior in real time.

You can enable your application to:

  • Refresh feature-dependent UI when flags change

  • Gracefully handle degraded states (i.e., when the provider becomes stale)

  • Log or alert on configuration or network issues

  • Control initialization flows based on provider readiness

For example:

For more information, go to the Harness FME iOS OpenFeature Provider GitHub repository.

Last updated

Was this helpful?