How can we help?

Targeting user by semantic app version

Targeting your users based in their application's semantic version is a great way to make sure you're getting the right features out to the right users. With LaunchDarkly, custom attributes may be leveraged to specify a ruleset expressive enough to define SemVer logic.


Suppose we have a feature we want to release only to users that are on app version >= 2.1.0, and we come across a user running the latest version of our app, 2.2.3, in this case:

user = {
"key": "a00bea",
"custom": {"majorVersion": 2, "minorVersion": 2, "patchVersion": 3}

By splitting our user's app version into three separate attributes, we can create a feature flag targeting rule targeting, which targets each version attribute separately:


Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request