Swift Phoenix Client
Swift Phoenix Client is an extension of Starscream websocket client library that makes it easy to connect to Phoenix sockets in a similar manner to the phoenix.js client.
The client is currently updated to mirror phoenix.js 1.4.
master currently supports Swift 5.0. You'll need to set your target to
= 1.0.1 if your project is using Swift 4.2
You can install SwiftPhoenix Client via CocoaPods by adding the following to your Podfile. Keep in mind that in order to use Swift Phoenix Client, the minimum iOS target must be '9.0'
platform :ios, '9.0' use_frameworks! pod "SwiftPhoenixClient", '~> 1.0'
pod install. From there you will need to add
import SwiftPhoenixClient in any class you want it to be used.
If you use Carthage to manage your dependencies, simply add
SwiftPhoenixClient to your
github "davidstump/SwiftPhoenixClient" ~> 1.0
Make sure you have added
Starscream.framework to the "Linked Frameworks and Libraries" section of your target, and have included them in your Carthage framework copying build phase.
Using the Swift Phoenix Client is extremely easy (and familiar if have used the phoenix.s client).
Also check out both the Swift and Elixir channels on IRC.
Check out the wiki page for getting started
Tested with the Phoenix Chat Server example, upgraded to Phoenix 1.2.
Many many thanks to Daniel Rees for his many contributions and continued maintenance of this project!
SwiftPhoenixClient is available under the MIT license. See the LICENSE file for more info.