Simple, fast & reliable Faye Websocket client. Well documented higher-level API build on SocketRocket, which is used as transport layer. Supports messaging on different channels.
- Simple: You don't have to care about messaging on different channels for yourself and can rely for the server-side part on Faye. Automatically JSON serialization and deserialization with Foundation's
NSJSONSerialization
. - Fast: It uses Websockets! Furthermore it use GCD intensively and tries to never block the main queue.
- Reliable connection: It automatically tries to reconnect, if the connection was interrupted. It uses SystemConfiguration's reachability events to observe connection state. Furthermore it observes UIKit's application active state notifications to disconnect when going in background and reconnect when becoming active.
- Well documented: You can install and open Appledoc documentation by executing
make doc
.
Basic exampleCreate a basic Bayeux sample serverCreate a basic sample app
- Implement structured unit tests
- Add a test server
- Port Faye's client cases to Cocoa/ObjC
- Support
hosts
advice - Add method to delegate protocol which allows intercept and modify all non meta messages
- Add Target to build for OS X
The recommended approach for installing SocketClient is via the CocoaPods package manager, as it provides flexible dependency management and dead simple installation.
Install CocoaPods if not already available:
$ [sudo] gem install cocoapods
$ pod setup
Change to the directory of your Xcode project, and Create and Edit your Podfile and add SocketClient:
$ cd /path/to/MyProject
$ touch Podfile
$ edit Podfile
platform :ios, '5.0'
pod 'SocketClient', '~> 0.1.0'
Install into your project:
$ pod install
-
Execute
git submodule add git@github.com:redpeppix-gmbh-co-kg/SocketClient.git vendor/SocketClient
. -
open vendor/SocketClient
-
Drop SocketClient.xcodeproj in your project navigator.
-
Add library libSocketClient.a to your project.
-
Add library libicucore.dylib to your project.
-
(Ensure that library was placed in group Frameworks.)
-
import <SocketClient/SocketClient.h>
where ever you want to use the library. You could add it to your header prefix file, if you want.
See the provided example app and the documentation for more information.
- jverkoey's iOS-Framework licensed under .
- Square's SocketRocket licensed under Apache License, Version 2.0.
- Installation tutorial chapter "Via Cocoapods" was adapted from RestKit.
Copyright (c) 2013 Marius Rackwitz marius@paij.com
The MIT License
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.