CocoaPods trunk is moving to be read-only. Read more on the blog, there are 13 months to go.
| TestsTested | ✓ |
| LangLanguage | SwiftSwift |
| License | MIT |
| ReleasedLast Release | Feb 2018 |
| SPMSupports SPM | ✗ |
Maintained by Herman Saprykin.
| Depends on: | |
| IDZSwiftCommonCrypto | ~> 0.10.0 |
| Starscream | ~> 3.0.4 |
To run the example project, clone the repo, and run pod install from the Example directory first. You could chat with here and command from Centrifugal web
Create client:
let timestamp = "\(Int(Date().timeIntervalSince1970))"
let token = Centrifuge.createToken(string: "\(user)\(timestamp)", key: secret)
let creds = CentrifugeCredentials(token: token, user: user, timestamp: timestamp)
let url = "wss://centrifugo.herokuapp.com/connection/websocket"
client = Centrifuge.client(url: url, creds: creds, delegate: self)
Connect to server:
client.connect { message, error in }Subscribe to channel:
client.subscribe(toChannel: channel, delegate: delegate) { message, error in }Publish:
client.publish(toChannel: channel, data: data) { message, error in }See the example project and docs for more information.
CentrifugeiOS is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod "CentrifugeiOS"German Saprykin, [email protected]
CentrifugeiOS is available under the MIT license. See the LICENSE file for more info.