Not ready for production use, work in progress
If you're interested in this plugin, please contact me.
cordova plugin add https://github.com/leecrossley/cordova-plugin-apple-watch.git
You do not need to reference any JavaScript, the Cordova plugin architecture will add a applewatch
object to your root automatically when you build.
Initialises the Apple Watch interface, this must be called and the success handler fired before messages can be sent.
applewatch.init(function successHandler(appGroupId) {}, errorHandler);
The successHandler
is called with one arg appGroupId
that was used in initialisation. The app bundleId will be used for identification by default, prefixed by "group.".
You can supply your own Application Group Id with the optional appGroupId
argument, this should be in the format "group.com.company.app":
applewatch.init(successHandler, errorHandler, appGroupId);
Sends a message object to a specific queue (must be called after successful init).
Used to send strings or json objects to the Apple Watch extension.
applewatch.sendMessage(successHandler, errorHandler, queueName, message);
Handles a message object received on a specific queue (must be called after successful init).
Used to handle strings or json objects received from the Apple Watch extension.
applewatch.handleMessage(messageHandler, queueName);
iOS 8.2+ only.