Skip to content

tooolkit/VPSocketIO

 
 

Repository files navigation

VPSocketIO

Socket.IO client for iOS. Supports socket.io 2.0+

It's based on a official Swift library from here: SocketIO-Client-Swift

It uses Jetfire Jetfire

Objective-C Example

#import <SocketIO-iOS/SocketIO-iOS.h>;
NSString *urlString = @"http://localhost:8080";
NSURL *url = [[NSURL alloc]initWithString:urlString];
self.manager = [[VPSocketManager alloc]initWithURL:url config:@{@"log":@(NO)}];
//    self.socket = [self.manager defaultSocket];
self.socket = [self.manager socketFor:@"/web"];
[self.socket on:@"connect" callback:^(NSArray *array, VPSocketAckEmitter *emitter) {
NSLog(@"%@",array);
}];
[self.socket connect];

Features

  • Supports socket.io 2.0+
  • Supports binary
  • Supports Polling and WebSockets
  • Supports TLS/SSL

Installation

Carthage

Add these line to your Cartfile:

github "vascome/vpsocketio" ~> 1.0.5 # Or latest version

Run carthage update --platform ios,macosx.

CocoaPods 1.0.0 or later

Create Podfile and add pod 'VPSocketIO' (pod files are case sensetive):

target 'MyApp' do
    pod 'VPSocketIO', '~> 1.0.5' # Or latest version
end

License

MIT

About

socket.io client objective-c

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Objective-C 99.6%
  • Ruby 0.4%