Quick-start
Installation
Getting started
Add the following to your Package.swift:
dependencies: [
.package(url: "https://github.com/flagship-io/openfeature-provider-iOS.git", from: "1.0.0")
]import ABTastyOpenfeature_iOS
import OpenFeatureRegister the ABTastyProvider with OpenFeature
// Create a context with an "openUserId"
let ctx = MutableContext(
targetingKey: "openUserId",
structure: MutableStructure(attributes: ["isQA": Value.boolean(true),
"city": Value.string("FR"),
"hasConsented": Value.boolean(true),
"ctx1": Value.boolean(false),
"ctx2": Value.integer(125),
"ctx3": Value.double(12.0)])
Task {
// Create ABTasty provider
let provider = ABTastyProvider(envId: "envId", apiKey: "apiKey", configurator: FSConfigBuilder().build())
// Set provider through OpenFeature API
await OpenFeatureAPI.shared.setProviderAndWait(provider: provider, initialContext: ctx)
}Flag Evaluation (Read Flag)
Context Updates
Last updated
Was this helpful?

