Configuration options for the LaunchDarkly React Native SDK.
Whether to treat all user attributes as private for event reporting for all users. The SDK will not include private attribute values in analytics events, but private attribute names will be sent. The default is false.
Whether to disable the automatic sending of an alias event when LDClient.identify is called with a non-anonymous user when the previous user is anonymous.
The default value is false
.
The interval by which the SDK polls for flag updates when the application is in the background.
The default value is 3600000ms (1 hour).
The timeout interval for connecting to LaunchDarkly for flag requests and event reports.
The default value is 10000ms (10 seconds).
Controls information logged to the console, and modifying some setting ranges to facilitate debugging.
This setting is only used when running in iOS. In Android this setting is ignored.
The default value is false.
Setting for whether sending diagnostic data about the SDK is disabled. The default is false.
The time interval between sending periodic diagnostic data. The default is 900000 (15 minutes).
Whether or not the SDK should attempt to check for flag updates while the application runs in the background.
If this is true, the client will periodically poll for updates while in the background; if false, the SDK will not attempt to receive updates while the app is backgrounded.
The default value is false.
Whether LaunchDarkly should provide additional information about how flag values were calculated.
The additional information will then be available through the client's
LDClient.*VariationDetail
methods. Since this increases the size of network requests,
such information is not sent unless you set this option to true.
The capacity of the analytics events queue.
The client buffers up to this many events in memory before flushing. If the capacity is exceeded before the queue is flushed, events will be discarded. Increasing the capacity means that events are less likely to be discarded, at the cost of consuming more memory. Note that in regular usage flag evaluations do not produce individual events, only summary counts, so you only need a large capacity if you are generating a large number of click, pageview, or identify events (or if you are using the event debugger).
The default value is 100.
The interval in between flushes of the analytics events queue, in milliseconds.
The default value is 30000ms (30 seconds).
The base URI for the LaunchDarkly events server.
Most users should use the default value.
Whether to include full user details in every analytics event.
The default is false
: events will only include the user key, except for one "identify" event
that provides the full details for the user.
Setting for the maximum number of locally cached users. Default is 5 users.
The mobile SDK key associated with your LaunchDarkly environment.
This field is required as the React Native SDK will use this value to uniquely identify your LaunchDarkly account.
Disables all network calls from the LaunchDarkly SDK.
This can also be specified after the client has been created, using LDClient.setOffline().
The default value is true (the client will make network calls).
The base URI for the LaunchDarkly polling server.
Most users should use the default value.
The interval by which the SDK polls for flag updates when the application is in the foreground. This property is only used if is the streaming connection is disabled.
The default value is 300000ms (5 min).
The names of user attributes that should be marked as private, and not sent to LaunchDarkly in analytics events.
You can also specify this on a per-user basis with [[LDUser.privateAttributeNames]].
The mapping of environment names as keys to mobile keys for each environment as values.
Whether or not to open a streaming connection to LaunchDarkly for live flag updates.
If this is true, the client will always attempt to maintain a streaming connection; if false, it never will.
The default value is true.
The base URI for the LaunchDarkly streaming server.
Most users should use the default value.
Whether or not to use the REPORT verb to fetch flag settings.
If this is true, flag settings will be fetched with a REPORT request including a JSON entity body with the user object.
Otherwise (by default) a GET request will be issued with the user passed as a base64 URL-encoded path parameter.
Do not use unless advised by LaunchDarkly.
An object that combines the result of a feature flag evaluation with information about how it was calculated.
This is the result of calling one of the LDClient.*VariationDetail
methods.
For more information, see the documentation.
The type of flag being evaluated.
An object describing the main factor that influenced the flag evaluation value.
The result of the flag evaluation. This will be either one of the flag's variations or the default value that was passed to the variation detail function.
The index of the returned value within the flag's list of variations, e.g. 0 for the
first variation-- or null
if the default value was returned.
Describes the reason that a flag evaluation produced a particular value. This is part of the LDEvaluationDetail object returned by the variation detail methods.
The flag could not be evaluated, so the default value was returned.
The kind of error which occurred.
Kinds of errors include:
'CLIENT_NOT_READY'
: The client is not able to establish a connection to LaunchDarkly yet. If there is a persistent feature store, the store does not yet contain flag data.'FLAG_NOT_FOUND'
: The flag key did not match any known flag.'USER_NOT_SPECIFIED'
: The user object or user key was not provided.'MALFORMED_FLAG'
: There was an internal inconsistency in the flag data. For example, a rule specified a nonexistent variation. This is an unusual condition that might require assistance from LaunchDarkly's Support team.'WRONG_TYPE'
: The application code requested the flag value with a different data type than it actually is. For example, the code asked for a boolean when the flag type is actually a string.'EXCEPTION'
: An unexpected error stopped flag evaluation. This could happen if you are using a persistent feature store and the database stops working. When this happens, the SDK always prints the specific error to the log.The flag is on, but the user did not match any targets or rules, so it returned the value that appears on the dashboard under "Default rule."
The flag is off and therefore returned its configured off value.
The flag had at least one prerequisite flag that either was off or did not return the desired variation. Because of this, the flag returned its "off" value.
The key of the prerequisite flag that failed.
The user who encountered the flag matched one of the flag's rules.
The rule's unique identifier, which stays the same even if you rearrange the order of the rules.
The positional index of the matched rule (0 for the first rule).
The user key was specifically targeted for this flag in the "Target individual users" section.
A LaunchDarkly user object.
Whether to show the user on the Users page in LaunchDarkly.
The default value is false.
The avatar associated with the user.
The country associated with the user.
Any additional attributes associated with the user.
The user's email address.
The user's first name.
The IP address associated with the user.
A unique string identifying a user.
If this value is not provided, a key will be generated automatically and the anonymous
property of the user will be set to true
. The SDK will provide a key value that is
non-identifying, unique between devices, but usually stable between launches of the
application on a specific device. The SDK cannot guarantee the value will not change
between launches as the platform may change identifiers provided to the application or
remove the locally stored application data.
The user's last name.
The user's name.
You can search for users on the User page by name.
Specifies a list of attribute names (either built-in or custom) which should be marked as private, and not sent to LaunchDarkly in analytics events.
The secondary key for the user. See the documentation for more information on it's use for percentage rollout bucketing.
Generated using TypeDoc
This is the API reference for the LaunchDarkly Client-Side SDK for React Native.
In typical usage, you will instantiate LDClient and then call configure once at startup time to set up your connection to LaunchDarkly.
For more information, see the SDK reference guide.