Blackhole is delightful iOS to watchOS communication framework, based on WatchConnectivity framework's WCSession.
Utilizes Wormhole concept, that simplifies data sync between iOS and watch devices. Also, provides set of handful protocols, allowing to create easily synchronized custom model classes.
Some of the features:
- start listeners, waiting for given communication message identifiers
- send simple messages
- send every object, that can be represented as Data
- request any object from counterpart app, be sending a message and specifying success handler
- all public api wrapped in convenient promises implementation (BrightFutures)
Must to have for watchOS development.
To run the example project, clone the repo, and run
pod install from the Example directory first.
Blackhole requires iOS 9.0+, and watchOS 3.0+. It requires Swift 3.0.
Blackhole is available through CocoaPods. To install it, simply add the following line to your Podfile:
or, if you intend to use it with BrightFutures (recommended!!!)
BrightFutures is great promises implementation, and it works with Blackhole like a charm. It allows to easily wrap async communication within app and phone (see the example app for reference). If you need more info on promises topic - check GirAppe blog post: "Promises, unravelling the spaghetti code".
Andrzej Michnia, firstname.lastname@example.org
Blackhole is available under the MIT license. See the LICENSE file for more info.