Swiftpack.co - Swift Packages by launchdarkly

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.

Packages published by launchdarkly

launchdarkly/swift-eventsource 3.1.0
Server-sent events (SSE) client implementation in Swift for iOS, macOS, tvOS, and watchOS
⭐️ 88
🕓 Yesterday
🔖 Release Notes

Releases

The markdown parsing is broken/disabled for release notes. Sorry about that, I'm chasing the source of a crash that's been bringing this website down for the last couple of days.
[3.1.0] - 2023-06-05
Yesterday
### Changed: - Enforce TLS v1.2 as a required minimum. ### Fixed: - Fix re-entrancy issue with `start` command. (Thanks, [g-mark](https://github.com/launchdarkly/swift-eventsource/pull/56)!)
[3.0.0] - 2022-10-06
34 weeks ago
### Changed - Dropped support for older versions in accordance with the new [Xcode 14 release](https://developer.apple.com/documentation/xcode-release-notes/xcode-14-release-notes).
[2.0.0] - 2022-08-29
40 weeks ago
### Changed - 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](https://github.com/launchdarkly/swift-eventsource/pull/48)).
[1.3.1] - 2022-03-11
1 year ago
### Fixed - Fixed a race condition that could cause a crash when `stop()` is called when there is a pending reconnection attempt.
[1.3.0] - 2022-01-18
1 year ago
### Added - Added the configuration option `urlSessionConfiguration` to `EventSource.Config` which allows setting the `URLSessionConfiguration` used by the `EventSource` to create `URLSession` instances. ### Fixed - 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 updated `lastEventId` even if the event does not generate a `MessageEvent`. - 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 "".
[1.2.1] - 2021-02-10
2 years ago
### Added - [SwiftLint](https://github.com/realm/SwiftLint) configuration. Linting will be automatically run as part of the build if [Mint](https://github.com/yonaskolb/Mint) is installed. - Support for building docs with [jazzy](https://github.com/realm/jazzy). These docs are available through [GitHub Pages](https://launchdarkly.github.io/swift-eventsource/). ### Fixed - 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](https://github.com/launchdarkly/swift-eventsource/pull/14)). - On an `UnsuccessfulResponseError` the configured `connectionErrorHandler` would be called twice, the second time with a `URLError.cancelled` error. Only if the second call returned `ConnectionErrorAction.shutdown` would the `EventSource` client actually shutdown. This has been corrected to only call the `connectionErrorHandler` once, and will shutdown the client if `ConnectionErrorAction.shutdown` is returned. Thanks to @tomasf for the PR ([#13](https://github.com/launchdarkly/swift-eventsource/pull/13)). - A race condition that could cause the `EventSource` client to restart after shutting down has been fixed.
[1.2.0] - 2020-10-21
2 years ago
### Added - Added `headerTransform` closure to `LDConfig` to allow dynamic http header configuration.
[1.1.0] - 2020-07-20
2 years ago
### Added - Support `arm64e` on `appletvos`, `iphoneos`, and `macosx` 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](https://github.com/apple/swift-corelibs-foundation/blob/master/Docs/Status.md).
[1.0.0] - 2020-07-16
2 years ago
This is the first public release of the LDSwiftEventSource library. The following notes are what changed since the previous pre-release version. ### Changed - Renamed `EventHandler.onMessage` parameter `event` to `eventType`. - The `EventSource` class no longer extends `NSObject` or `URLSessionDataDelegate` to not expose `urlSession` functions.
[0.5.0] - 2020-07-14
2 years ago
### Changed - Default `LDSwiftEventSource` product defined for the SwiftPM package is now explicitly a dynamic product. An explicitly static product is now available as `LDSwiftEventSourceStatic`.
iOS macOS watchOS tvOS linux macOS iOS
launchdarkly/ios-client-sdk version2.5.1.1
LaunchDarkly Client-side SDK for iOS (Swift and Obj-C)
⭐️ 58
🕓 10 hours ago
🔖 Release Notes

Releases

The markdown parsing is broken/disabled for release notes. Sorry about that, I'm chasing the source of a crash that's been bringing this website down for the last couple of days.
[8.1.0] - 2023-06-05
11 hours ago
### Changed: - Enforce TLS v1.2 as a required minimum. ### Fixed: - Allow setting kind through `trySet`.
[8.0.1] - 2023-02-28
14 weeks ago
### Fixed: - Remove the extra `privateAttributes` meta field from the event payload. This extra field prevented LaunchDarkly services from accepting SDK events when private attributes were specified.
[8.0.0] - 2022-12-07
25 weeks ago
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 for [Swift](https://docs.launchdarkly.com/sdk/client-side/ios/migration-7-to-8-swift) or [Objective-C](https://docs.launchdarkly.com/sdk/client-side/ios/migration-7-to-8-objc). ### Added: - The type `LDContext` defines the new context model. - For all SDK methods that took an `LDUser` parameter, there is now an overload that takes an `LDContext`. ### Changed: - The `secondary` attribute which existed in `LDUser` is no longer a supported feature. If you set an attribute with that name in `LDContext`, it will simply be a custom attribute like any other. - Analytics event data now uses a new JSON schema due to differences between the context model and the old user model. - The SDK no longer adds `device` and `os` values to the user attributes. Applications that wish to use device/OS information in feature flag rules must explicitly add such information. ### Removed: - Removed the `secondary` meta-attribute in `LDUser`. - The `alias` method no longer exists because alias events are not needed in the new context model. - The `autoAliasingOptOut` and `inlineUsersInEvents` options no longer exist because they are not relevant in the new context model.
[7.1.0] - 2022-11-08
30 weeks ago
### Added: - Added Objective C bindings for ApplicationInfo.
[7.0.0] - 2022-10-12
33 weeks ago
### Changed: - Dropped support for older versions in accordance with the new [Xcode 14 release](https://developer.apple.com/documentation/xcode-release-notes/xcode-14-release-notes).
[6.2.0] - 2022-09-01
39 weeks ago
### Added: - CI builds now include a cross-platform test suite implemented in https://github.com/launchdarkly/sdk-test-harness. This covers many test cases that are also implemented in unit tests, but may be extended in the future to ensure consistent behavior across SDKs in other areas. - Introduced ApplicationInfo, for configuration of application metadata that may be used in LaunchDarkly analytics or other product features. This does not affect feature flag evaluations. ### Changed: - Updated LDSwiftEventSource to 2.0.0. We no longer bind to a static product; rather, we let the build determine static vs dynamic linking. ### Fixed: - Previously a deleted flag could be made available in the SDK if the deletion events were processed out of order. This is no longer the case.
[6.1.0] - 2022-05-17
1 year ago
### Added - Added the `LDUser.isAnonymousNullable` property that allows treating the `isAnonymous` property as nullable. ### Fixed - Correctly track whether the `LDUser.isAnonymous` property was set explicitly (or by not specifying a key). The variation result for flag rules targeting the `anonymous` property can differ depending on whether the property is set explicitly.
[6.0.0] - 2022-05-04
1 year ago
This major version has accompanying migration guides for [Swift](https://docs.launchdarkly.com/sdk/client-side/ios/migration-5-to-6-swift) and [Objective-C](https://docs.launchdarkly.com/sdk/client-side/ios/migration-5-to-6-objc). Please see the guide for more information on updating to this version of the SDK, as the following is just a summary of the changes. Note that Objective-C bridging types are prefixed by `Objc`, but that prefix is not exposed to code written in Objective-C. For example, changes listed to `ObjcLDClient` are changes to the class referred to as `LDClient` from within Objective-C. ### Added - Added the `LDValue` class to represent any data type that is allowed in JSON. This new type is used to provide more type safety when representing complex or non-statically determined data types. The SDK also provides the bridge types `ObjcLDValue` and `ObjcLDValueType` for Objective-C interoperability. - Added the `UserAttribute` class which provides a less error-prone way to refer to user attribute names in configuration. - Added the type specific variation functions, `boolVariation`, `intVariation`, `doubleVariation`, `stringVariation`, and `jsonVariation`, to `LDClient`. - Added the type specific detailed variation functions, `boolVariationDetail`, `intVariationDetail`, `doubleVariationDetail`, `stringVariationDetail`, and `jsonVariationDetail`, to `LDClient`. - Added `jsonVariation` and `jsonVariationDetail` to `ObjcLDClient`. These functions allow evaluating feature flags where the provided `defaultValue` and the resulting variation can be any valid JSON data type. - Added `ObjcLDJSONEvaluationDetail` for retrieving the detailed evaluation information of arbitrary type flag variations. - Added `ObjcLDChangedFlagHandler` type alias for new non-type specific Objective-C flag observers. ### Changed (API) - `LDClient.track(key: data: metricValue:)` no longer `throws`. - The type of the `data` parameter of `LDClient.track(key: data: metricValue:)` has changed from `Any?` to `LDValue?`. - `ObjcLDClient.track(key: data:)` and `ObjcLDClient.track(key: data: metricValue:)` no longer `throws`. In Objective-C this change means that the `track` functions no longer accept a `error:` parameter. - The type of the `data` parameter of `ObjcLDClient.track(key: data:)` and `ObjcLDClient.track(key: data: metricValue)` has changed from `Any?` to `ObjLDValue?`. In Objective-C this would be a change from `id _Nullable` to `LDValue * _Nullable`. - `LDClient.allFlags` now has the type `[LDFlagKey: LDValue]?` rather than `[LDFlagKey: Any]?`. - `ObjcLDClient.allFlags` now has the type `[String: ObjcLDValue]?` rather than `[String: Any]?`. In Objective-C this would be a change from `NSDictionary<NSString*, id> * _Nullable` to `NSDictionary<NSString*, LDValue*> * _Nullable`. - The type of the `LDUser.custom` dictionary, and the corresponding `LDUser.init` parameter has been changed from `[String: Any]?` to `[String: LDValue]`. - The type of the `ObjcLDUser.custom` property has been changed from `[String: Any]?` to `[String: ObjcLDValue]`. In Objective-C this would be a change from `NSDictionary<NSString*, id> * _Nullable` to `NSDictionary<NSString*, LDValue*> * _Nonnull`. - The type of the `LDUser.privateAttributes` property, and the corresponding `LDUser.init` parameter, have been changed from `[String]?` to `[UserAttribute]`. - The type of the `ObjcLDUser.privateAttributes` property has been changed from `[String]?` to `[String]`. In Objective-C this would be a change from `NSArray<NSString*> * _Nullable` to `NSArray<NSString*> * _Nonnull`. - The types of the properties `LDChangedFlag.oldValue` and `LDChangedFlag.newValue` have been changed from `Any?` to `LDValue`. - The type of the `LDConfig.privateUserAttributes` property has been changed from `[String]?` to `[UserAttribute]`. - `ObjcLDConfig.privateUserAttributes` now has the non-optional type `[String]` rather than `[String]?`. In Objective-C this would be a change from `NSArray<NSString*> * _Nullable` to `NSArray<NSString*> * _Nonnull`. - The type of the `LDEvaluationDetail.reason` property has been changed from `[String: Any]` to `[String: LDValue]`. - The type of the `reason` property of `ObjcLDBoolEvaluationDetail`, `ObjcLDIntegerEvaluationDetail`, `ObjcLDDoubleEvaluationDetail`, and `ObjcLDStringEvaluationDetail` has been changed from `[String: Any]?` to `[String: ObjcLDValue]?`. In Objective-C this would be a change from `NSDictionary<NSString*, id> * _Nullable` to `NSDictionary<NSString*, LDValue*> * _Nullable`. ### Changed (behavioral) - The `Equatable` instance for `LDUser` has been changed to compare all user properties, rather than just the `key` property. - Using `"custom"` as a private attribute name in `LDConfig.privateUserAttributes` or `LDUser.privateAttributes` will no longer set all `LDUser` custom attributes private. - The automatically set `device` and `operatingSystem` custom attributes can now be set private. - SDK versions from 4.0.0 and less than 6.0.0 supported migration of cached flag data from any SDK version of at least 2.3.3. The 6.0.0 release only supports migration of cached flag data from SDK versions of at least 4.0.0. ### Removed - Removed `LDClient.variation(forKey: defaultValue:)` and `LDClient.variationDetail(forKey: defaultValue:)` functions. Please use the new type-specific variation functions instead (e.g. `LDClient.boolVariation(forKey: defaultValue:)`). - Removed the `LDFlagValueConvertible` protocol which was previously used to constrain the parameters and return types of the variation functions. - `LDErrorHandler` and `LDClient.observeError(owner: handler:)` have been removed. Please use `ConnectionInformation` instead. - Removed the `LDUser.init(userDictionary: )` and `ObjcLDUser.init(userDictionary: )` initializers, please use the explicit initializers instead. - Removed `LDUser.CodingKeys`. To refer to user attributes, please use `UserAttribute` instead. - Removed `LDUser.privatizableAttributes` and `ObjcLDUser.privatizableAttributes`. - Removed `ObjcLDUser.attributeCustom`. - The `LDUser.device` and `LDUser.operatingSystem` properties, and the corresponding `LDUser.init` parameters have been removed. These fields will be included in the `LDUser.custom` dictionary. - The `ObjcLDUser.device` and `ObjcLDUser.operatingSystem` properties have been removed. These fields will be included in the `ObjcLDUser.custom` dictionary. - The `ObjcLDClient` functions, `arrayVariation`, `arrayVariationDetail`, `dictionaryVariation`, and `dictionaryVariationDetail`, have been removed. Please use `ObjcLDClient.jsonVariation` and `ObjcLDClient.jsonVariationDetail` instead. - The per-type instances of `ObjcLDChangedFlag` have been removed. Please use the base class `ObjcLDChangedFlag`, which now provides `oldValue` and `newValue` `ObjcLDValue` properties. The removed classes are `ObjcLDBoolChangedFlag`, `ObjcLDIntegerChangedFlag`, `ObjcLDDoubleChangedFlag`, `ObjcLDStringChangedFlag`, `ObjcLDArrayChangedFlag`, and `ObjcLDDictionaryChangedFlag`. - The classes `ObjcLDArrayEvaluationDetail` and `ObjcLDDictionaryEvaluationDetail` have been removed. Please use `ObjcLDJSONEvaluationDetail` instead. - The type aliases, `ObjcLDBoolChangedFlagHandler`, `ObjcLDIntegerChangedFlagHandler`, `ObjcLDDoubleChangedFlagHandler`, `ObjcLDStringChangedFlagHandler`, `ObjcLDArrayChangedFlagHandler`, and `ObjcLDDictionaryChangedFlagHandler`, have been removed. Please use `ObjcLDChangedFlagHandler` instead. - The `ObjcLDClient` functions, `observeBool`, `observeInteger`, `observeDouble`, `observeString`, `observeArray`, and `observeDictionary`, have been removed. Please use the non-type specific `ObjcLDClient.observe(key: owner: handler:)` instead.
[5.4.5] - 2022-03-11
1 year ago
### Fixed - Fixed race condition in `LDSwiftEventSource` that could cause a crash if the stream is explicitly stopped (such as when `identify` is called) while the stream is waiting to reconnect.
[5.4.4] - 2022-01-19
1 year ago
### Fixed - Fixed memory leak when stream connections are terminated by updating `LDSwiftEventSource` dependency to [1.3.0](https://github.com/launchdarkly/swift-eventsource/releases/tag/1.3.0). - The SDK would not allow additional fields on `delete` flag stream events. This has been updated to allow additional fields for improved future compatibility. - Improved internal `Throttler` implementation to reduce concurrency concerns. - Removed unneeded `Cartfile` defining `LDSwiftEventSource` dependency, which when bundled could lead to warning messages that `LDSwiftEventSource` definitions are implemented in multiple frameworks.
iOS macOS watchOS tvOS

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics