CocoaPods trunk is moving to be read-only. Read more on the blog, there are 9 months to go.

RemoteBus 1.0.0

RemoteBus 1.0.0

TestsTested
LangLanguage Obj-CObjective C
License MIT
ReleasedLast Release May 2015

Maintained by Arturo Gutierrez.



RemoteBus 1.0.0

  • By
  • Arturo Gutierrez

Small library to pass messages between iOS apps and extensions. RemoteBus simulates a bus between app and extension to provide a mechanism to to synchronize data or just pass events in a easy way.

Demo

Demo

Usage

    // Create bus for this app group and name
    remoteBus = [[RBRemoteBus alloc] initWithName:@"OneBus" appGroupIdentifier:@"group.com.arturogutierrez.remotebus"];

    // Subscribe for remote events
    [remoteBus subscribeForIdentifier:@"SomeEventIdentifier" subscriber:^(RBMessage *message) {
        NSString *text = (NSString *) message.body;
        [self.label setText:text];
    }];

    // Pass an event
    RBMessage *message = [[RBMessage alloc] initWithIdentifier:@"AnotherEventIdentifier" body:@"Hey there!"];
    [remoteBus sendMessage:message];

Installation

  • Download the source files (Classes folder) and add to your project or install it via CocoaPods
  • Configure your app and extension to use same app group container. You can learn how to do it here or here.

Pod

It will be available via CocoaPods very soon.

Example

You can check a example in the Example folder or just take a look into the Tests.

Developed By

Follow me on Twitter Add me to Linkedin

License

Copyright 2015 Arturo Gutiérrez Díaz-Guerra

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.