All notable changes to the LaunchDarkly Swift EventSource library will be documented in this file. This project adheres to Semantic Versioning.
3.3.0 (2024-05-31)
- adds ability to provide a OSLog instance via the Config.logger property (c10ec29)
- adds ability to provide a OSLog instance via the Config.logger property (#78) (2220929)
3.2.0 (2023-12-29)
- Per the SSE spec, an HTTP 204 will now halt retry attempts by default.
- Enforce TLS v1.2 as a required minimum.
- Fix re-entrancy issue with
start
command. (Thanks, g-mark!)
- Dropped support for older versions in accordance with the new Xcode 14 release.
- The CI build now incorporates the cross-platform contract tests defined in https://github.com/launchdarkly/sse-contract-tests to ensure consistent test coverage across different LaunchDarkly SSE implementations.
- Removed explicit typed package products. Thanks to @simba909 for the PR (#48).
- Fixed a race condition that could cause a crash when
stop()
is called when there is a pending reconnection attempt.
- Added the configuration option
urlSessionConfiguration
toEventSource.Config
which allows setting theURLSessionConfiguration
used by theEventSource
to createURLSession
instances.
- Fixed a retain cycle issue when the stream connection is ended.
- Removed deprecated
VALID_ARCHS
build setting from Xcode project. - Unterminated events will no longer be dispatched when the stream connection is dropped.
- Stream events that set the
lastEventId
will now record the updatedlastEventId
even if the event does not generate aMessageEvent
. - Empty stream "data" fields will now always record a newline to the resultant
MessageEvent
data. - Empty stream "event" fields will result in now result in the default "message" event type rather than an event type of "".
- SwiftLint configuration. Linting will be automatically run as part of the build if Mint is installed.
- Support for building docs with jazzy. These docs are available through GitHub Pages.
- Reconnection backoff was always reset if the previous successful connection was at least
backoffResetThreshold
prior to the scheduling of a reconnection attempt. The connection backoff has been corrected to not reset after the first reconnection attempt until the next successful connection. Thanks to @tomasf for the PR (#14). - On an
UnsuccessfulResponseError
the configuredconnectionErrorHandler
would be called twice, the second time with aURLError.cancelled
error. Only if the second call returnedConnectionErrorAction.shutdown
would theEventSource
client actually shutdown. This has been corrected to only call theconnectionErrorHandler
once, and will shutdown the client ifConnectionErrorAction.shutdown
is returned. Thanks to @tomasf for the PR (#13). - A race condition that could cause the
EventSource
client to restart after shutting down has been fixed.
- Added
headerTransform
closure toLDConfig
to allow dynamic http header configuration.
- Support
arm64e
onappletvos
,iphoneos
, andmacosx
SDKs by extending valid architectures. - Support for building LDSwiftEventSource on Linux. Currently this library will not generate log messages on Linux, and may not behave correctly on Linux due to Foundation being incomplete.
This is the first public release of the LDSwiftEventSource library. The following notes are what changed since the previous pre-release version.
- Renamed
EventHandler.onMessage
parameterevent
toeventType
. - The
EventSource
class no longer extendsNSObject
orURLSessionDataDelegate
to not exposeurlSession
functions.
- Default
LDSwiftEventSource
product defined for the SwiftPM package is now explicitly a dynamic product. An explicitly static product is now available asLDSwiftEventSourceStatic
.
- Converted build system to use a single target to produce a universal framework, rather than separate targets for each platform that share a product name. This is to prevent issues with
xcodebuild
resolving the build scheme to an incorrect platform when building dependent packages with 'Find Implicit Dependencies' enabled. This is due to a bug inxcodebuild
, for more information see http://www.openradar.me/20490378 and http://www.openradar.me/22008701.
- Added
stop()
method to shutdown the EventSource connection.
- Logging
subsystem
renamed fromcom.launchdarkly.swift-event-source
tocom.launchdarkly.swift-eventsource
- Public constructors for
UnsuccessfulResponseError
andMessageEvent
to allow consumers of the library to use them for unit tests.
- Initial implementation for internal alpha testing.