FeatureFlagManager
public protocol FeatureFlagManager : AnyObject, Sendable
Airship feature flag manager
-
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
var resultCache: any FeatureFlagResultCache { get } -
featureFlagStatusUpdatesAsynchronousFeature flag status updates. Possible values are upToDate, stale and outOfDate.
Declaration
Swift
var featureFlagStatusUpdates: AsyncStream<any Sendable> { get async } -
featureFlagStatusAsynchronousCurrent feature flag status. Possible values are upToDate, stale and outOfDate.
Declaration
Swift
var featureFlagStatus: FeatureFlagUpdateStatus { get async } -
Tracks a feature flag interaction event.
Declaration
Swift
func trackInteraction(flag: FeatureFlag)Parameters
flagThe flag.
-
flag(name:AsynchronoususeResultCache: ) Gets and evaluates a feature flag.
Throws
ThrowsFeatureFlagErrorif the flag fails to resolve.Declaration
Swift
func flag(name: String, useResultCache: Bool) async throws -> FeatureFlagReturn Value
The feature flag.
-
flag(name:Asynchronous) Gets and evaluates a feature flag using a result cache.
Throws
ThrowsFeatureFlagErrorif the flag fails to resolve.Declaration
Swift
func flag(name: String) async throws -> FeatureFlagReturn Value
The feature flag.
-
waitRefresh()AsynchronousWaits for the refresh of the Feature Flag rules.
Declaration
Swift
func waitRefresh() async -
waitRefresh(maxTime:Asynchronous) Waits for the refresh of the Feature Flag rules.
Declaration
Swift
func waitRefresh(maxTime: TimeInterval) async
View on GitHub