launchdarkly / swift-eventsource

Server-sent events (SSE) client implementation in Swift for iOS, macOS, tvOS, and watchOS
https://launchdarkly.github.io/swift-eventsource/
Other
187 stars 34 forks source link
eventsource feature-flags feature-toggles ios launchdarkly launchdarkly-sdk launchdarkly-sdk-component macos managed-by-terraform server-sent-events swift tvos watchos

LDSwiftEventSource

Run CI CocoaPods Carthage compatible SwiftPM compatible Platform

LDSwiftEventSource is a cross platform implementation of the EventSource specification written in Swift. It was developed for use in the LaunchDarkly iOS SDK. Generated API docs are available on GitHub Pages.

Requirements

Installation

CocoaPods

To use the CocoaPods dependency manager to integrate LDSwiftEventSource into your Xcode project, specify it in your Podfile:

pod 'LDSwiftEventSource', '~> 3.3'

Carthage

To use the Carthage dependency manager to integrate LDSwiftEventSource into your Xcode project, specify it in your Cartfile:

github "LaunchDarkly/swift-eventsource" ~> 3.3

Swift Package Manager

The Swift Package Manager is a dependency manager integrated into the swift compiler and Xcode. Note that the LDSwiftEventSource Swift package provides both a LDSwiftEventSource product, which is explicitly dynamic, and a LDSwiftEventSourceStatic product which is explicitly static.

To integrate LDSwiftEventSource into an Xcode project, go to the project editor, and select Swift Packages. From here hit the + button and follow the prompts using https://github.com/LaunchDarkly/swift-eventsource.git as the URL.

To include LDSwiftEventSource in a Swift package, simply add it to the dependencies section of your Package.swift file. And add the desired product as a dependency for your targets.

dependencies: [
    .package(url: "https://github.com/LaunchDarkly/swift-eventsource.git", .upToNextMajor(from: "3.3.0"))
]

Contributing

We encourage pull requests and other contributions from the community. Check out our contributing guidelines for instructions on how to contribute to this SDK.

About LaunchDarkly