Skip to main content

User Targeting with Semantic Versioning Now Available

· One min read
Gergely Sinka

Satisfying the feature request of our customers from the mobile app development industry, ConfigCat now supports semantic version (SemVer) based user targeting. Typical use case where app builders wish to enable or disable features based on the iOS or Android version on the device their app is running on. For example deciding if 2.3.40 is less than or equals 2.30.4 sometimes not that straightforward by only using the traditional < > = comparators.

semver-menu

As always you can expect consistent behavior from all the ConfigCat SDKs evaluating semantic versions.

How to use semantic version based targeting?

  1. On the Dashboard add a targeting rule to your feature flag with a Custom user attribute.

  2. Select one of the SemVer comparators and add a condition. semver

  3. In your app code pass a version number with the User Object as a custom parameter to the ConfigCat Client.

     User user = new User("##SOME-USER-IDENTIFICATION##")
    {
    Email = "[email protected]",
    Custom =
    {
    { "Version", "2.30.4"}
    }
    };

    var isEnabled = client.GetValue("myAwesomeFeature", false, user);

Evaluation is based on the SemVer Semantic Version Specification.

See detailed docs on Comparators.