Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
linking optimizely isFeatureEnabled
let userId = "user123"
let attributes: [String: Any] = [
"customerId": 123, // Attributes used for targeted audience-based rollout
"isVip": true,
enabled = delegate.optimizely.isFeatureEnabled(featureKey: "hello_world", userId: userId, attributes: attributes)
print("Feature is enabled? - \(enabled) for userId: \(userId)")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment