Skip to content

Instantly share code, notes, and snippets.

@timelincoln7648
Created January 17, 2020 21:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save timelincoln7648/da4577e2df99f698044b7dbc91bd6519 to your computer and use it in GitHub Desktop.
Save timelincoln7648/da4577e2df99f698044b7dbc91bd6519 to your computer and use it in GitHub Desktop.
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