SocketIO-Kit is a Socket.io iOS client with type safe, clean syntax and speed in mind. WebSocket is the only transport that is implemented and it uses SwiftWebSocket.
Installation
Carthage
Then run carthage update
.
Follow the current instructions in Carthage's README
for up to date installation instructions.
CocoaPods
To install it, simply add the following line to your Podfile:
You will also need to make sure you're opting into using frameworks:
Then run pod install
with CocoaPods 0.36 or newer.
Manually
Download the project and copy the SocketIO-Kit
folder into your project and use the Source
files. You need Runes v2.0.0 (Swift 1.2) framework to run SocketIO-Kit because it uses infix operators for monadic functions and you need SwiftWebSocket v0.1.18 (Swift 1.2).
There is no need for import SocketIOKit
when manually installing.
Requirements
- iOS 8.0+ / Mac OS X 10.10+
- Xcode 6.3 (Swift 1.2)
⚠️ Swift 2.0 version, please use branch Swift2
.
Usage
Options
Examples
Retrieving an image
Working with structs
Working with classes
Features
To implement
- [ ] Reconnect automatically
- [x] Complete documentation
- [ ] Test on iOS 7.0+ and Mac OS X 10.9+
- [ ] BDD Tests
Debugging
You can opt into seeing messages by supplying the DEBUG flag. Just add -D DEBUG
in Build Settings > Swift Compiler - Custom Flags: Other Swift Flags
.
Contributing
See the CONTRIBUTING document. Thank you, contributors!
Author
Ricardo Pereira, @ricardopereiraw