Skip to content

RokkinCat/phoenix-objc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Phoenix-ObjC

CI Status Version License Platform

Example

// Opens connection to Phoenix
Phoenix *phoenix = [[Phoenix alloc] initWithURL:[NSURL URLWithString:@"ws://10.0.0.12:4000/ws"]];
[phoenix setDelegate:self];
[phoenix open];

// Creates, listens on, and joins channel
PhoenixChannel *channel = [[PhoenixChannel alloc] initWithName:@"channel" topic:@"incoming" message:nil withPhoenix:_phoenix];
[channel on:@"response:event" handleEventBlock:^(id message) {
    NSLog(@"Message - %@", message);
}];
[channel join];

Usage

To run the example project, clone the repo, and run pod install from the Example directory first.

Requirements

SocketRocket - 0.3.1-beta2

Installation

Phoenix-ObjC is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod "Phoenix-ObjC"

Author

Josh Holtz, [email protected]

License

Phoenix-ObjC is available under the MIT license. See the LICENSE file for more info.