FeatureFlagManager

public final class FeatureFlagManager : Sendable

Airship feature flag manager

  • The shared FeatureFlagManager instance. Airship.takeOff must be called before accessing this instance.

    Declaration

    Swift

    @available(*, deprecated, message: "Use Airship.featureFlagManager instead")
    public static var shared: FeatureFlagManager { get }
  • Feature flag result cache. This can be used to return a cached result for flag(name:useResultCache:) if the flag fails to resolve or it does not exist.

    Declaration

    Swift

    public let resultCache: FeatureFlagResultCache
  • Tracks a feature flag interaction event.

    Declaration

    Swift

    public func trackInteraction(flag: FeatureFlag)

    Parameters

    flag

    The flag.

  • Gets and evaluates a feature flag

    Throws

    Throws FeatureFlagError if the flag fails to resolve.

    Declaration

    Swift

    public func flag(name: String, useResultCache: Bool = true) async throws -> FeatureFlag

    Return Value

    The feature flag.