All notable changes to the LaunchDarkly iOS SDK will be documented in this file. This project adheres to Semantic Versioning.
- Update to DarklyEventSource
3.2.7
- Synchronized summary event creation to limit thread access and protect data integrity
- Improved the robustness of the code creating summary events to better handle unexpected data
- Updated
DarklyEventSource
in order to fix potential flag stream parsing issues.
- Removed early tests for reaching event capacity that caused benign Thread Sanitizer warnings
- Changed pointer nil tests to clear Static Analyzer pointer comparison warnings
- To reduce the network bandwidth used for analytics events, feature request events are now sent as counters rather than individual events, and user details are now sent only at intervals rather than in each event. These behaviors can be modified through the LaunchDarkly UI and with the new configuration option
inlineUsersInEvents
. For more details, see Analytics Data Stream Reference. - New property
inlineUserInEvents
inLDConfig
. WhenYES
includes the full user (excluding private attributes) in analyticsfeature
andcustom
events. WhenNO
includes only theuserKey
. Default:NO
. - Calling
start
orupdateUser
(when started) onLDClient
logs an analyticsidentify
event.identify
events contain the full user (excluding private attributes) regardless ofinlineUserInEvents
. - Adds analytics
summary
event used to track feature flag requests to the SDK. - Adds analytics
debug
event available to assist with debugging when requested from the website Debugger.
- Changes analytics
feature
events so that they are only sent when requested via the website Dashboard. - Fixed a defect preventing the SDK from updating correctly on a
put
streaming event when there are no flag changes. - Fixed a defect on
watchOS
causing the SDK to report analytics dates incorrectly.
- Clears selected warnings in CocoaPods project
LDClient
isOnline
readonly property that reports the online/offline status.LDClient
setOnline
method to set the online/offline status.setOnline
may operate asynchronously, so the client calls an optional completion block when the requested operation completes.
- Fixed potential memory leak with
DarklyEventSource
.
LDClient
online
andoffline
methods.
- Calling
updateUser
onLDClient
while streaming no longer causes the SDK to request feature flags. The SDK now disconnects from the LaunchDarkly service and reconnects with the updated user. - Calling
updateUser
onLDClient
while polling now resets the polling timer after making a feature flag request.
- Changes the minimum required
DarklyEventSource
to version3.2.1
in the CocoaPods podspec - The maximum backoff time for reconnecting to the feature stream is now 1 hour.
- Changes the minimum required
DarklyEventSource
to version3.2.0
in the CocoaPods podspec
- Support for enhanced feature streams, facilitating reduced SDK initialization times.
- The
streamUrl
property onLDConfig
now expects a path-less base URI. The default is now"https://clientstream.launchdarkly.com"
. If you override the default, you may need to modify the property value.
- The minimum polling interval is now 5 minutes.
- Removes user flag config values from event reports
- Improves SSE connection error handling
- Support for specifying private user attributes in order to prevent user attributes from being sent in analytics events back to LaunchDarkly. See the
allUserAttributesPrivate
andprivateUserAttributes
properties ofLDConfig
as well as theprivateAttributes
property ofLDUserBuilder
.
- Carthage builds no longer crash due to a missing DarklyEventSource library.
LDClientManager
no longer extendsUIApplicationDelegate
. The framework is now marked as extension-safe. Thanks @atlassian-gaustin!
- Detect 401 Unauthorized response on flag & event requests, and take the client offline when detected.
- Detect LDEventSource report of 401 Unauthorized response on connection requests, and take the client offline when detected.
- LDClient delegate method
userUnchanged
called when the client receives a feature flag update that does not change any flag keys or values. Thanks @atlassian-gaustin! - Xcode 9 support
- LDPollingManager now reads the config set at the time of the startPolling message and configures polling timers accordingly.
- LDRequestManager now reads the config set at the time of the performRequest message to configure the API request.
- Removes duplicate LDEventSource libraries linked warning
updateUser
now updates theLDUser
anonymous
property when using a default user key.
useReport
property onLDConfig
to allow switching the request verb fromGET
toREPORT
. Do not use unless advised by LaunchDarkly.
- Updated for Xcode 9 support
-streamUrl
property on LDConfig
to allow customizing the Server Sent Events engine in streaming mode.
doubleVariation
method fordouble
value feature flags, as an alternative tonumberVariation
. Thanks @atlassian-gaustin!serverConnectionUnavailable
ClientDelegate method called when the LDClient receives an error response to a feature flag request. Thanks @atlassian-gaustin!
- Prevent creating an EventSource when an EventSource is already running. Thanks @atlassian-gaustin!
- Move feature flag response processing to the request thread, and once complete return the result on the main thread. Thanks @atlassian-gaustin!
- Array and Dictionary flags now return the array or dictionary when available from the server instead of always returning fallback values. Thanks @atlassian-gaustin!
- Streaming no longer generates multiple feature flag requests on return to the foreground
- Feature flag requests for users with non-ASCII data are now encoded correctly
UserUpdatedNotification
posts only when the feature flag configuration changes for the user- Events are no longer added to the event store when capacity is reached
- Resolve potential symbol conflicts with EventSource
- Feature flag request payloads are much smaller
- The
name
property inLDUserBuilder
, for setting a full name. This property complements the existingfirstName
andlastName
properties.
LDConfig
has been refactored to replace the Builder pattern expected withLDConfigBuilder
. Thanks @petrucci34!
LDConfigBuilder
has been deprecated and will be removed in the 3.0 release.- The
withXXX
methods ofLDUserBuilder
have been deprecated in favor of properties. These methods will be removed in the 3.0 release.
- Race condition in
LDPollingManager
identified by Thread Sanitizer
- Memory leak with
NSURLSession
inEventSource
. Thanks @jimmaye!
- The client's background fetch interval can be configured using
withBackgroundFetchInterval
.
- By default, the client allows one background fetch per 60 minutes.
- Memory leak with
NSURLSession
inLDRequestManager
. Thanks @jimmaye! - Race condition when the client is used in multiple threads
- Feature flag persistence is now more efficient
- Client crashes if a feature flag is off and no off-variation is specified
- The default connection timeout is now actually 10 seconds, down from the system default of 60 seconds. Use
withConnectionTimeout
to change the setting.
- Potential race conditions when HTTP requests exceed 10 seconds
- HTTP requests now honor the configured connection timeout
- Benign race conditions in LDRequestManager
- Support for tvOS 9.0+
- Support for watchOS 2.0+
- Support for macOS 10.10+
- Umbrella header (
Darkly/Darkly.h
)
- Library is now a dynamic framework in order to support the Carthage dependency manager
- Minimum supported iOS version is now iOS 8.0+
- Updated streaming host from
stream.launchdarkly.com
toclientstream.launchdarkly.com
- Default (foreground) polling interval was reduced to 5 minutes
- Minimum polling interval was reduced to 1 minute
- Potential range exception issue in event processing
- Ability to disable streaming and enable interval-based polling
- Uncaught exception
NSInvalidArgumentException
inperformEventRequest
- Backoff with jitter for connection establishment of eventsource
- Parity for
start
vs.online
andstopClient
vs.offline
- Method to get notified with the flag key for which the value had changed
- Background fetch issues fixed
- Removed AFNetworking
- Code optimizations and cleanup
- Optimized events storage and polling algorithms
- Events generated simultaneously at the same time appear sequentially on web console without events loss
- Updated to use AFNetworking 3.1
- Minor code cleanup
- DarklyEventSource linker errors patched
- Support for multivariate feature flags. New methods for multivariate flags:
stringVariation
,numberVariation
,arrayVariation
, anddictionaryVariation
have been added toLDClient
. - Support for streaming and real-time feature flag updates
- Added support for background fetching
- In
LDClient
,toggle
value is now calledboolVariation
- Changed 'default value' to 'fallback value' to represent the value returned if LaunchDarkly is unreachable and no previous settings are stored for the current user (no behavior changed)
- Improved ability to store multiple unique user contexts per device
- Improved support to ensure that a user receives the latest flag values even when the app is backgrounded or in airplane mode
- In
LDConfig
,withApiKey
has been renamed towithMobileKey
- Removed dependency on Core Data (no interfaces or behavior changed)
- Device information is included in user custom attributes in events
- Actual and default flag values are sent in Feature Request Events
- Existing flag config data is no longer sent with evaluation requests, which
avoids
Too long request string
errors