cordova-plugin-apple-watch icon indicating copy to clipboard operation
cordova-plugin-apple-watch copied to clipboard

Naming conflicts

Open JasonTolliver opened this issue 8 years ago • 3 comments

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.

JasonTolliver avatar Dec 01 '16 02:12 JasonTolliver

@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

JasonTolliver avatar Dec 01 '16 02:12 JasonTolliver

I did figure things out and this is indeed improperly documented for the most recent version.

JasonTolliver avatar Dec 08 '16 00:12 JasonTolliver

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?

jmmclean avatar Feb 28 '17 22:02 jmmclean