2.0.0
[2.0.0] - 2023-04-26
The latest version of this SDK supports LaunchDarkly's new custom contexts feature. Contexts are an evolution of a previously-existing concept, "users." Contexts let you create targeting rules for feature flags based on a variety of different information, including attributes pertaining to users, organizations, devices, and more. You can even combine contexts to create "multi-contexts."
For detailed information about this version, please refer to the list below. For information on how to upgrade from the previous version, please read the migration guide.
Added:
- The type
LDContextand associated builders which define the new context model. - For SDK methods that took an
LDUserparameter, there is now an overload (ex:startWithContext) that takes anLDContext. The SDK still supportsLDUserfor now, butLDContextis the preferred model andLDUsermay be removed in a future version.
Changed:
- The
secondaryattribute which existed inLDUseris no longer a supported feature. If you set an attribute with that name inLDContext, it will simply be a custom attribute like any other. - Analytics event data now uses a new JSON schema due to differences between the context model and the old user model.
- The SDK no longer adds
deviceandosvalues to the user attributes. Applications that wish to use device/OS information in feature flag rules must explicitly add such information. maxCachedUsersis nowmaxCachedContextsLDConfig.privateAttributeNamesis nowprivateAttributes
Removed:
- Removed the
secondarymeta-attribute inLDUserandLDUser.Builder. - The
aliasmethod no longer exists because alias events are not needed in the new context model. - The
inlineUsersInEventsoption no longer exists because it is not relevant in the new context model.