A package for connecting to and interacting with Phoenix channels from Apple OSes written in Swift taking advantage of the built-in WebSocket support and Swift Concurrency.
The public interfaces of Socket and Channel are simple structs whose public methods are exposed as closures. The reason for this design is to make it easy to inject fake sockets and channels into your code for testing purposes.
The actual implementations of Phoenix socket and channel are PhoenixSocket and PhoenixChannel, but those are not available publicly. Rather, you can opt in to using them via the Socket.production(url:) factory.
Compatible with Phoenix channels vsn=2.0.0 only.
Installation
To use Phoenix, add a dependency to your Package.swift file:
Phoenix channels client for Apple OS’s
(macOS, iOS, iPadOS, tvOS, and watchOS)
A package for connecting to and interacting with Phoenix channels from Apple OSes written in Swift taking advantage of the built-in WebSocket support and Swift Concurrency.
The public interfaces of
Socket
andChannel
are simple structs whose public methods are exposed as closures. The reason for this design is to make it easy to inject fake sockets and channels into your code for testing purposes.The actual implementations of Phoenix socket and channel are
PhoenixSocket
andPhoenixChannel
, but those are not available publicly. Rather, you can opt in to using them via theSocket.production(url:)
factory.Compatible with Phoenix channels vsn=2.0.0 only.
Installation
To use Phoenix, add a dependency to your Package.swift file:
Usage
Tests
Using Xcode
phoenix-apple
directoryphoenix-apple
directory using XcodeUsing
swift test
phoenix-apple
directoryswift test