Skip to content

Instantly share code, notes, and snippets.

@timelincoln7648
Created January 10, 2020 22:16
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/35fd71318b68132bf77be004f25cd0d0 to your computer and use it in GitHub Desktop.
Save timelincoln7648/35fd71318b68132bf77be004f25cd0d0 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,
]
let 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