This repository has been archived by the owner on Oct 29, 2024. It is now read-only.
Releases: launchdarkly/react-native-client-sdk
Releases · launchdarkly/react-native-client-sdk
4.2.0
[4.2.0] - 2021-05-19
Added:
LDUser
now has an optionalsecondary
attribute to match other LaunchDarkly SDKs. For more on the behavior of this attribute see the documentation on targeting users.- Support for multiple LaunchDarkly projects or environments. Each set of feature flags associated with a mobile key is called an environment. (#10)
secondaryMobileKeys
is now a config option which allows a mapping of names to the SDK keys for each additional environment.mobileKey
is still required, and represents the primary environment.- Many methods including variations, track, and listeners now support an optional
environment
parameter to evaluate the method against the givenenvironment
.
4.1.2
[4.1.2] - 2021-04-28
Fixed:
- The
LDEvaluationReasonErrorKind
,LDEvaluationReasonKind
,LDConnectionMode
, andLDFailureReason
enum TypeScript types were undefined when evaluated at runtime due to being defined in an ambient context. This was also fixed in SDK version 4.0.3 with React Native 0.63 compatibility.
4.0.3
[4.0.3] - 2021-04-28
Fixed:
- The
LDEvaluationReasonErrorKind
,LDEvaluationReasonKind
,LDConnectionMode
, andLDFailureReason
enum TypeScript types were undefined when evaluated at runtime due to being defined in an ambient context.
4.1.1
[4.1.1] - 2021-04-23
Fixed:
- Android: Fixed an issue where the
jsonVariationDetail
method inLDClient
returnedPromise<Record<string, any>>
instead of the declared return type ofPromise<LDEvaluationDetail<Record<string, any>>>
. This was also fixed in SDK version 4.0.2 with React Native 0.63 compatibility.
4.0.2
[4.0.2] - 2021-04-23
Fixed:
- Android: Fixed an issue where the
jsonVariationDetail
method inLDClient
returnedPromise<Record<string, any>>
instead of the declared return type ofPromise<LDEvaluationDetail<Record<string, any>>>
.
4.1.0
4.0.1
[4.0.1] - 2021-04-06
Fixed:
- iOS: Internal throttling logic would sometimes delay new poll or stream connections even when there were no recent connections. This caused switching active user contexts using
identify
to sometimes delay retrieving the most recent flags, and therefore delay the completion of the returned Promise.
4.0.0
[4.0.0] - 2021-03-31
Added:
- Added
getConnectionMode
,getLastSuccessfulConnection
,getLastFailedConnection
, andgetLastFailure
methods toLDClient
. These methods can be used to report on the SDK's connection to LaunchDarkly. The newLDConnectionMode
andLDFailureReason
enum types have been added to support these methods. These methods replace thegetConnectionInformation
method which behaved differently across platforms. - Added a
getVersion
method toLDClient
to get the version of the React Native SDK. - Added an optional
timeout
value to theconfigure
method to specify that the SDK should block up to a specified duration while initializing. - Added a new client configuration option,
maxCachedUsers
, toLDClientConfig
. You can now specify the number of users to be cached locally on the device or use-1
for unlimited cached users. - Added new user configuration options,
ip
andavatar
, toLDUserConfig
. - The SDK now periodically sends diagnostic data to LaunchDarkly, describing the version and configuration of the SDK, the operating system the SDK is running on, the device type (such as "iPad"), and performance statistics. No credentials, device IDs, or other identifiable values are included. This behavior can be disabled or configured with the new
LDClientConfig
propertiesdiagnosticOptOut
anddiagnosticRecordingInterval
. - Added reporting of the SDK's "wrapper name" and "wrapper version" for internal reporting purposes.
- iOS: Added XCode 12 support (#64)
- iOS: Added support for the
isInitialized
method. Previously this method only worked when running on Android.
Changed:
- Renamed the
LDClientConfig
type toLDConfig
for consistency with other LaunchDarkly SDKs. Corresponding parameter names and documentation have also been updated to reflect this change. - Renamed the
LDUserConfig
type toLDUser
for consistency with other LaunchDarkly SDKs. Corresponding parameter names and documentation have also been updated to reflect this change. - Renamed
baseUri
inLDConfig
(formerlyLDClientConfig
) topollUri
to clarify that this URI is only used when polling. - The
fallback
parameter of allLDClient
variation methods has been renamed todefaultValue
to help distinguish it fromfallback
values in rules specified in the LaunchDarkly dashboard. - Changed the default polling domain from
app.launchdarkly.com
toclientsdk.launchdarkly.com
. - Android: Updated the Android SDK native module from 2.10.0 to 2.14.1
- Android: Error stacktrace logging in the bridge layer now uses Timber instead of
System.err
- iOS: Updated the iOS SDK native module from 4.5.0 to 5.4.0 (#65)
- iOS: The minimum iOS deployment target has been updated from 8.0 to 10.0.
- iOS: The maximum backoff delay between failed streaming connections has been reduced from an hour to 30 seconds. This is to prevent being unable to receive new flag values for up to an hour if the SDK has reached its maximum backoff due to a period of network connectivity loss.
- iOS: The backoff on streaming connections will not be reset after just a successful connection, rather waiting for a healthy connection for one minute after receiving flags. This is to reduce congestion in poor network conditions or if extreme load prevents the LaunchDarkly service from maintaining an active streaming connection.
- iOS: When sending events to LaunchDarkly, the SDK will now retry the request after a one second delay if it fails.
- iOS: When events fail to be sent to LaunchDarkly, the SDK will no longer retain the events. This prevents double recording events when the LaunchDarkly service received the event but the SDK failed to receive the acknowledgement.
Fixed:
- The
getConnectionInformation
method inLDClient
had inconsistent return types across the iOS and Android platforms. This API has been split into separate methods which are consistently typed across platforms - see the notes above. (#59) - Android: Fixed an issue where
identify
ran on the current thread instead of on a background thread (thanks, orthanc and hackdie!) - Android: Fixed an issue where an exception was thrown if
configure
was invoked multiple times. Now, subsequent invocations result in a rejected promise. (#40) - Android: Fixed an issue where the
evaluationReasons
option inLDClientConfig
was not used when configuring the Android SDK native module. - Android: Fixed an issue where
NullPointerException
s were possible if certain methods were invoked while the client was initializing (discussed in #55) - Android: Fixed an issue where initialization may never complete if the network status of foreground state changed before the future had completed.
- Android: Fixed an issue where a
NullPointerException
could occur when calling a variation method with a flag key that does not exist locally or is of the wrong type. This issue could only occur if a null fallback value was provided. - Android: Improved event summarization logic to avoid potential runtime exceptions.
- Android: Internal throttling logic would sometimes delay new poll or stream connections even when there were no recent connections. This caused switching active user contexts using
identify
to sometimes delay retrieving the most recent flags, and therefore delay the completion of the returned Promise. - Android: Previously, the SDK manifest required the SET_ALARM permission. This permission was never used, so it has been removed.
- Android: Improved handling of exceptions thrown by the alarm manager on Samsung devices.
- iOS: Fixed an issue preventing private custom attribute names being recorded in events when all custom attributes are set to be private by including "custom" in the
LDUserConfig.privateAttributeNames
orLDClientConfig.allUserAttributesPrivate
properties. - iOS: Fixed an issue to prevent a crash that would rarely occur as the SDK transitioned to an online state for a given configuration or user. This issue may have been exacerbated for a short period due to a temporary change in the behavior of the LaunchDarkly service streaming endpoint.
- OS: Fix
metricValue
argument totrack
to work with all numbers.
Removed:
- Removed the
LDClientConfig
type. - Removed the
LDUserConfig
type. - Removed the
getConnectionInformation
method inLDClient
. - Removed the
isDisableBackgroundPolling
method inLDClient
. - Removed the
baseUri
attribute inLDConfig
(formerlyLDClientConfig
).