Inherits from MMWormhole : NSObject
Conforms to WCSessionDelegate
Declared in MMWormholeSession.h

Tasks

  • + sharedListeningSession

    This method returns a specific instance of MMWormholeSession that should be used for listening. You may create your own instances of MMWormholeSession for sending messages, but this is the only object that will be able to receive messages.

  • – activateSessionListening

    This method should be called after all of your initial listeners have been set and you are ready to begin listening for messages. There are likely some listeners that your application requires to be active so that it won’t miss critical messages. You should set up these listeners before calling this method so that any already queued messages will be delivered immediately when you activate the session. Any listeners you set up after calling this method may miss messages that were already queued and waiting to be delivered.

Class Methods

sharedListeningSession

+ (instancetype)sharedListeningSession
Discussion

This method returns a specific instance of MMWormholeSession that should be used for listening. You may create your own instances of MMWormholeSession for sending messages, but this is the only object that will be able to receive messages.

The reason for this is that MMWormholeSession is based on the WCSession class that is part of the WatchConnectivity framework provided by Apple, and WCSession is itself a singleton with a single delegate. Therefore, to receive callbacks, only one MMWormholeSession object may register itself as a listener.

Declared In

MMWormholeSession.h

Instance Methods

activateSessionListening

- (void)activateSessionListening
Discussion

This method should be called after all of your initial listeners have been set and you are ready to begin listening for messages. There are likely some listeners that your application requires to be active so that it won’t miss critical messages. You should set up these listeners before calling this method so that any already queued messages will be delivered immediately when you activate the session. Any listeners you set up after calling this method may miss messages that were already queued and waiting to be delivered.

Declared In

MMWormholeSession.h