Latest 0.0.5
Homepage https://github.com/seegno/primus-emitter-objc
License MIT
Platforms ios 6.0, osx 10.8, requires ARC
Dependencies Primus

Primus-Emitter-Objc is an implementation of the Primus-Emitter plugin for the Primus realtime framework.

The library is fully unit tested using Specta, Expecta and OCMockito.

Build Status

Use it

pod 'PrimusEmitter'

Quick Start

#import <PrimusEmitter/PrimusEmitter.h>

- (void)start
{
    // By emitting an event on the server-side, the following listener will fire
    [primus on:@"custom:event:here", ^{
        NSLog(@"Received custom event");
    }];

    // The last parameter is a block that you can execute to acknowlege the event
    [primus on:@"another:example", ^(AckBlock ack) {
        NSLog(@"Received another event. Calling callback...");

        ack();
    }];
}

Credits

Many thanks to Jonathan Brumley, creator of the original primus-emitter plugin.

Latest podspec

{
    "name": "PrimusEmitter",
    "version": "0.0.5",
    "summary": "Simple emitter wrapper for primus-objc",
    "homepage": "https://github.com/seegno/primus-emitter-objc",
    "authors": "Seegno",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "source": {
        "git": "https://github.com/seegno/primus-emitter-objc.git",
        "tag": "0.0.5"
    },
    "source_files": [
        "PrimusEmitter/*.{h,m}",
        "PrimusEmitter/**/*.{h,m}"
    ],
    "requires_arc": true,
    "platforms": {
        "ios": "6.0",
        "osx": "10.8"
    },
    "dependencies": {
        "Primus": []
    }
}

Pin It on Pinterest

Share This