Latest 0.1.1
Homepage https://github.com/UberJason/CommunicatorKit
License MIT
Platforms ios 11.0, watchos 4.0
Authors

Version
License
Platform

A framework for managing WatchConnectivity communication between phone and watch. Should be considered experimental for now, although one app has already been shipped with it.

Installation

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

pod "CommunicatorKit"

Usage

Sending Messages

Define message objects that conform to the TransferMessage protocol, and ask Communicator to send them. (If your set of messages is finite and well-known, you can conform an enum to the TransferMessage protocol.)

Handling Incoming Messages

Define a message-handling class that conforms to the MessageHandler protocol, pass it to Communicator on initialization, and Communicator will use that class to handle whenever messages come in.

Handling Errors

Optionally define a class that conforms to the CommunicatorErrorDelegate protocol, and Communicator will pass errors to that class.

Suggested Usage

One suggested usage pattern is to subclass Communicator on the watchOS and iOS side to handle platform-specific needs, and to use extensions on Communicator itself to handle needs on both platforms. You might also use a singleton Communicator (or Communicator subclass) retained by the AppDelegate / ExtensionDelegate to be able to send messages globally from within your applications.

Author

Jason Ji, [email protected]

License

CommunicatorKit is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "CommunicatorKit",
    "version": "0.1.1",
    "summary": "A framework for managing WatchConnectivity communication between iPhone and Apple Watch.",
    "description": "A framework for managing WatchConnectivity communication between phone and watch. Should be considered experimental for now, although one app has already been shipped with it. Define message objects that conform to the TransferMessage protocol, and ask Communicator to send them. Define a message-handling class that conforms to the MessageHandler protocol, and Communicator will defer to that class whenever messages come in. Optionally define a class that conforms to the CommunicatorErrorDelegate protocol, and Communicator will pass errors to that class.",
    "homepage": "https://github.com/UberJason/CommunicatorKit",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Jason Ji": "[email protected]"
    },
    "source": {
        "git": "https://github.com/UberJason/CommunicatorKit.git",
        "tag": "0.1.1"
    },
    "social_media_url": "https://twitter.com/UberJason",
    "platforms": {
        "ios": "11.0",
        "watchos": "4.0"
    },
    "source_files": "CommunicatorKit/Source/**/*",
    "swift_version": "5.0"
}

Pin It on Pinterest

Share This