cordova-plugin-apple-watch
cordova-plugin-apple-watch copied to clipboard
Naming conflicts
In using the latest plugin from npm
(i.e. 0.11.5) with Xcode 8.1 (8B62)
and iOS 10.1 I am getting warnings that multiple methods/constants have been renamed. From the docs:
// assumes your WatchKit extension references Wormhole.h in a Bridging-Header.h file
-let watchConnectivityListeningWormhole = MMWormholeSession.sharedListeningSession();
+let watchConnectivityListeningWormhole = MMWormholeSession.sharedListening();
-watchConnectivityListeningWormhole.activateSessionListening();
+watchConnectivityListeningWormhole.activateListening();
let wormhole = MMWormhole(applicationGroupIdentifier: "group.com.yourcompany", optionalDirectory: nil, transitingType: .SessionContext);
and
// assumes wormhole is initialised (above)
-watchConnectivityListeningWormhole.listenForMessageWithIdentifier("from_phone_queue", listener:
{ (messageObject) -> Void in
+watchConnectivityListeningWormhole.listenForMessage(withIdentifier: "from_phone_queue", listener: { (messageObject) -> Void in
if let message: AnyObject = messageObject {
// handle your message here
}
})
This might just be some strange configuration issue on my part, even with these changes I still am not passing info properly. However, I can't even build in Xcode without them so I thought I'd pass this along.
@leecrossley I'll be happy to submit a PR to the README
once I figure out wth nothing's working for me, though I don't believe it's related to this
I did figure things out and this is indeed improperly documented for the most recent version.
Was this ever resolved...it looks like it may just be a doc item...but i can't find references to these functions anywhere in the source code?