cordova-plugin-apple-watch
Advanced tools
Comparing version 0.8.8 to 0.9.0
{ | ||
"name": "cordova-plugin-apple-watch", | ||
"version": "0.8.8", | ||
"version": "0.9.0", | ||
"author": "Lee Crossley <leee@hotmail.co.uk> (http://ilee.co.uk/)", | ||
@@ -5,0 +5,0 @@ "description": "Cordova / PhoneGap Plugin for the Apple Watch (WatchKit) to allow in memory and lightweight json object message passing over named queues from a Cordova app to Apple Watch (and vice versa).", |
@@ -225,2 +225,12 @@ ## Apple Watch Plugin for Apache Cordova [](http://badge.fury.io/js/cordova-plugin-apple-watch) | ||
### getUserDefaults | ||
Allows retrieval of user default data. | ||
```js | ||
applewatch.getUserDefaults(successHandler, errorHandler, "myKey", appGroupId); | ||
``` | ||
The app bundleId will be used for identification by default, prefixed by "group." if `appGroupId` is not supplied. | ||
## Live demo | ||
@@ -227,0 +237,0 @@ |
@@ -43,2 +43,10 @@ | ||
AppleWatch.prototype.getUserDefaults = function (onSuccess, onError, key, appGroupId) { | ||
var payload = { | ||
"key": key, | ||
"appGroupId": appGroupId | ||
}; | ||
exec(onSuccess, onError, "AppleWatch", "getUserDefaults", [payload]); | ||
}; | ||
AppleWatch.prototype.addListener = function (queueName, onMessage) { | ||
@@ -45,0 +53,0 @@ var wrappedOnMessage = function (message) { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
270623
271
246