7.0.0
[7.0.0] - 2023-02-24
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."
This feature is only available to members of LaunchDarkly's Early Access Program (EAP). If you're in the EAP, you can use contexts by updating your SDK to the latest version and, if applicable, updating your Relay Proxy. Outdated SDK versions do not support contexts, and will cause unpredictable flag evaluation behavior.
If you are not in the EAP, only use single contexts of kind "user", or continue to use the user type if available. If you try to create contexts, the context will be sent to LaunchDarkly, but any data not related to the user object will be ignored.
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 types
LDContext,LDSingleKindContext, andLDMultiKindContextdefine the new "context" model.
Changed:
-
LDConfigchanges to be consistent with the Javascript SDK:pollUri,streamUri,eventsUriare nowpollUrl,streamUrlandeventsUrl.eventsCapacityis noweventCapacityeventsFlushIntervalMillis,connectionTimeoutMillis,pollingIntervalMillis,backgroundPollingIntervalMillisare nowflushInterval,connectionTimeout,pollingInterval,backgroundPollingInterval.diagnosticRecordingIntervalMillisis nowdiagnosticRecordingIntervalmaxCachedUsersis nowmaxCachedContextsallUserAttributesPrivate,privateAttributeNamesare nowallAttributesPrivateandprivateAttributes
-
LDUsertype is now imported from the Javascript sdk common package. -
All SDK methods that took an
LDUserparameter now take anLDContext.LDUseris now a subset ofLDContext, so existing code based on users will still work.
Removed:
- Support for React Native versions < 0.69 have been removed. The LaunchDarkly React Native SDK now supports only React Native versions >=0.69.0 <0.71.0.
- Removed the
secondarymeta-attribute inLDUser. - The
aliasmethod no longer exists because alias events are not needed in the new context model. - The
autoAliasingOptOutandinlineUsersInEventsoptions no longer exist because they are not relevant in the new context model.
Deprecated:
- The
LDUserobject has been deprecated. Support forLDUseris maintained to simplify the upgrade process, but it is recommended to useLDContextin the shape of eitherLDSingleKindContextorLDMultiKindContext.